I don\'t get what I\'m doing wrong. I can\'t set token expiration time.
File: AuthServiceProvider.php
Add these lines
use Laravel\Passport\Bridge\PersonalAccessGrant;
use League\OAuth2\Server\AuthorizationServer;
Add the following code in boot function
public function boot() {
Passport::routes();
$lifetime = new \DateInterval('PT24H'); // For 24hours
$this->app->get(AuthorizationServer::class)->enableGrantType(new PersonalAccessGrant(), $lifetime);
}