Skip to content

Commit 0359d1b

Browse files
committed
Sobescreve classe TokenRepository para resolver problema com tipos de classes
1 parent 20f310a commit 0359d1b

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/MongodbPassportServiceProvider.php

+4
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,9 @@ public function register()
3232
$this->app->extend(PassportClientCommand::class, function () {
3333
return new ClientCommand();
3434
});
35+
36+
$this->app->bind(PassportTokenRepository::class, function () {
37+
return $this->app->make(TokenRepository::class);
38+
});
3539
}
3640
}

src/Passport/TokenRepository.php

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace Sysvale\Mongodb\Passport;
4+
5+
use Laravel\Passport\TokenRepository as PassportTokenRepository;
6+
7+
class TokenRepository extends PassportTokenRepository
8+
{
9+
/**
10+
* Store the given token instance.
11+
*
12+
* @param \Laravel\Passport\Token $token
13+
* @return void
14+
*/
15+
16+
public function save($token)
17+
{
18+
$token->save();
19+
}
20+
21+
}

0 commit comments

Comments
 (0)