anonymous-1983
12/6/2018 - 1:45 AM

【Laravel】5.7 REST API SETUP

【Laravel】5.7 REST API SETUP

composer require laravel/passport
php artisan make:auth
php artisan migrate
php artisan passport:install

use Laravel\Passport\HasApiTokens;
Illuminate\Support\Facades\Gate;
use HasApiTokens, Notifiable;
use Laravel\Passport\Passport;
Illuminate\Support\Facades\Gate;

//$this->registerPolicies();の下に
Passport::routes();
// driverを変更
'driver' => 'passport'