Skip to content

Commit 130cce8

Browse files
committed
JT feedback
1 parent d1afb7b commit 130cce8

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

docs/includes/auth/AppServiceProvider.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
use Illuminate\Support\ServiceProvider;
66
use MongoDB\Laravel\Passport\AuthCode;
7+
use MongoDB\Laravel\Passport\Client;
8+
use MongoDB\Laravel\Passport\PersonalAccessClient;
9+
use MongoDB\Laravel\Passport\RefreshToken;
10+
use MongoDB\Laravel\Passport\Token;
711

812
class AppServiceProvider extends ServiceProvider
913
{
@@ -20,5 +24,9 @@ public function register(): void
2024
public function boot(): void
2125
{
2226
Passport::useAuthCodeModel(AuthCode::class);
27+
Passport::useClientModel(Client::class);
28+
Passport::usePersonalAccessClientModel(PersonalAccessClient::class);
29+
Passport::useRefreshTokenModel(RefreshToken::class);
30+
Passport::useTokenModel(Token::class);
2331
}
2432
}

docs/user-authentication.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,13 @@ the ``DocumentModel`` trait:
243243
protected $keyType = 'string';
244244
}
245245

246-
After defining a custom model, instruct Passport to use the model in the ``boot``
246+
After defining each custom model, instruct Passport to use the models in the ``boot()``
247247
method of your application's ``App\Providers\AppServiceProvider`` class, as shown
248248
in the following code:
249249

250250
.. literalinclude:: /includes/auth/AppServiceProvider.php
251251
:language: php
252-
:emphasize-lines: 6,22
252+
:emphasize-lines: 26-30
253253
:dedent:
254254

255255
You can now use Laravel Passport and MongoDB in your application. For more information, see

0 commit comments

Comments
 (0)