0
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

  • I think you can solve your own question, by marking it solved, check to see if there's a button to help you with that. Otherwise: comment on yourself with your solution and then mark that as the right answer – UnderDog Dec 18 '22 at 16:52

0 Answers0