From 6ad2c6d68da179d171208db076c3b84f3571967b Mon Sep 17 00:00:00 2001 From: Jeremy Postlethwaite Date: Sat, 10 Feb 2024 02:34:03 -0800 Subject: [PATCH] Matching method to contract for createToken() --- src/Contracts/HasApiTokens.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Contracts/HasApiTokens.php b/src/Contracts/HasApiTokens.php index ba2a6b3f..6c15d26a 100644 --- a/src/Contracts/HasApiTokens.php +++ b/src/Contracts/HasApiTokens.php @@ -2,6 +2,8 @@ namespace Laravel\Sanctum\Contracts; +use DateTimeInterface; + interface HasApiTokens { /** @@ -24,9 +26,10 @@ public function tokenCan(string $ability); * * @param string $name * @param array $abilities + * @param \DateTimeInterface|null $expiresAt * @return \Laravel\Sanctum\NewAccessToken */ - public function createToken(string $name, array $abilities = ['*']); + public function createToken(string $name, array $abilities = ['*'], DateTimeInterface $expiresAt = null); /** * Get the access token currently associated with the user.