Skip to content

Commit a166c00

Browse files
committed
passport configaration
1 parent 1b4d93b commit a166c00

File tree

5 files changed

+465
-4
lines changed

5 files changed

+465
-4
lines changed

app/Providers/AuthServiceProvider.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Providers;
44

5+
use Laravel\Passport\Passport;
56
use Illuminate\Support\Facades\Gate;
67
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
78

@@ -25,6 +26,6 @@ public function boot()
2526
{
2627
$this->registerPolicies();
2728

28-
//
29+
Passport::routes();
2930
}
3031
}

app/User.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
namespace App;
44

5+
use Laravel\Passport\HasApiTokens;
56
use Illuminate\Notifications\Notifiable;
67
use Illuminate\Contracts\Auth\MustVerifyEmail;
78
use Illuminate\Foundation\Auth\User as Authenticatable;
89

910
class User extends Authenticatable
1011
{
11-
use Notifiable;
12+
use HasApiTokens, Notifiable;
1213

1314
/**
1415
* The attributes that are mass assignable.

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"php": "^7.1.3",
1212
"fideloper/proxy": "^4.0",
1313
"laravel/framework": "5.7.*",
14+
"laravel/passport": "^7.0",
1415
"laravel/tinker": "^1.0"
1516
},
1617
"require-dev": {

0 commit comments

Comments
 (0)