diff options
author | Marvin Borner | 2018-07-20 14:09:41 +0200 |
---|---|---|
committer | Marvin Borner | 2018-07-20 14:09:41 +0200 |
commit | 400591b34d4b0a6288834539808a9dede8a60e3a (patch) | |
tree | a1aab8b14a620af4cb5b7130c5efd3eaa2ba7a7d /app | |
parent | 932d439444f10774bff546923cc0a2e5e2f2857b (diff) |
Added passport (for oauth2)
Diffstat (limited to 'app')
-rw-r--r-- | app/Providers/AuthServiceProvider.php | 3 | ||||
-rw-r--r-- | app/User.php | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 9784b1a..5ea0865 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -2,6 +2,7 @@ namespace App\Providers; +use Laravel\Passport\Passport; use Illuminate\Support\Facades\Gate; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; @@ -25,6 +26,6 @@ class AuthServiceProvider extends ServiceProvider { $this->registerPolicies(); - // + Passport::routes(); } } diff --git a/app/User.php b/app/User.php index bfd96a6..0638c66 100644 --- a/app/User.php +++ b/app/User.php @@ -2,12 +2,13 @@ namespace App; +use Laravel\Passport\HasApiTokens; use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; class User extends Authenticatable { - use Notifiable; + use HasApiTokens, Notifiable; /** * The attributes that are mass assignable. |