use Illuminate\Support\Facades\Date;
$expiresAt = Date::now()->addMinutes(5);
$token = $user->createToken('token name', ['server:update'], $expiresAt)->plainTextToken;
if you want to add expiry time for a token you can do it like this
use Illuminate\Support\Facades\Date;
$expiresAt = Date::now()->addMinutes(5);
$token = $user->createToken('token name', ['server:update'], $expiresAt)->plainTextToken;
if you want to add expiry time for a token you can do it like this