步骤一:composer require laravel/passport=~4.0
步骤二:php artisan migrate
步骤三:php artisan passport:install
步骤四:
步骤五:
步骤六:
步骤七:php artisan passport:keys
步骤八:管理客户端:php artisan passport:client
步骤九:在app.php中添加Laravel\Passport\PassportServiceProvider::class,
步骤十:在routes/api.php 添加
Route::any('/login', 'Api\AuthenticateController@login')->name('login');
步骤十一:参考地址:https://laravel-china.org/articles/6035/laravel55-developing-api-combat