app\Providers\AuthServiceProvider.php
use Carbon\Carbon; public function boot() { // ... Passport::tokensExpireIn(Carbon::now()->addMinutes(1)); }
參考資料
Token Lifetimes
https://laravel.com/docs/5.4/passport#configuration
Carbon 時間套件
http://kejyun.github.io/Laravel-5-Learning-Notes-Books/package/tool/package-tool-carbon.html