Skip to content

Commit

Permalink
dodanie laravel passport
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-boduch committed May 12, 2019
1 parent 9165e1f commit a480e3d
Show file tree
Hide file tree
Showing 5 changed files with 472 additions and 4 deletions.
3 changes: 2 additions & 1 deletion app/Models/User.php
Expand Up @@ -13,6 +13,7 @@
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use Illuminate\Notifications\RoutesNotifications;
use Laravel\Passport\HasApiTokens;
use Ramsey\Uuid\Uuid;

/**
Expand Down Expand Up @@ -60,7 +61,7 @@
*/
class User extends Model implements AuthenticatableContract, AuthorizableContract, CanResetPasswordContract
{
use Authenticatable, Authorizable, CanResetPassword, RoutesNotifications;
use Authenticatable, Authorizable, CanResetPassword, RoutesNotifications, HasApiTokens;

/**
* The database table used by the model.
Expand Down
3 changes: 3 additions & 0 deletions app/Providers/AuthServiceProvider.php
Expand Up @@ -23,6 +23,7 @@
use Illuminate\Cache\CacheManager;
use Illuminate\Contracts\Auth\Access\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Laravel\Passport\Passport;

class AuthServiceProvider extends ServiceProvider
{
Expand Down Expand Up @@ -98,6 +99,8 @@ public function boot()
return $permissions[$ability] ?? false;
});
}

Passport::routes();
}

/**
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -55,7 +55,8 @@
"erusev/parsedown": "^1.7",
"laravel-notification-channels/twilio": "^2.0",
"filp/whoops": "^2.3",
"fideloper/proxy": "^4.0"
"fideloper/proxy": "^4.0",
"laravel/passport": "^7.2"
},
"require-dev": {
"fzaninotto/faker": "^1.5",
Expand Down

0 comments on commit a480e3d

Please sign in to comment.