File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 3
3
namespace App \Providers ;
4
4
5
5
use App \Helpers \Image ;
6
+ use App \Helpers \Utils ;
6
7
use Illuminate \Auth \Events \Lockout ;
7
8
use Illuminate \Auth \Notifications \ResetPassword ;
8
9
use Illuminate \Auth \Notifications \VerifyEmail ;
13
14
use Illuminate \Support \ServiceProvider ;
14
15
use Illuminate \Support \Str ;
15
16
use Illuminate \Validation \ValidationException ;
17
+ use App \Models \PersonalAccessToken ;
18
+ use Laravel \Sanctum \Sanctum ;
16
19
17
20
class AppServiceProvider extends ServiceProvider
18
21
{
@@ -107,5 +110,9 @@ public function boot(): void
107
110
Request::macro ('deviceName ' , function (): string {
108
111
return Utils::getDeviceNameFromDetector ($ this ->device ());
109
112
});
113
+
114
+ if (config ('auth.defaults.guard ' ) === 'api ' ) {
115
+ Sanctum::usePersonalAccessTokenModel (PersonalAccessToken::class);
116
+ }
110
117
}
111
118
}
You can’t perform that action at this time.
0 commit comments