Skip to content

Commit

Permalink
Matching method to contract for createToken()
Browse files Browse the repository at this point in the history
  • Loading branch information
gammamatrix authored Feb 10, 2024
1 parent 28458c6 commit 6ad2c6d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Contracts/HasApiTokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Laravel\Sanctum\Contracts;

use DateTimeInterface;

interface HasApiTokens
{
/**
Expand All @@ -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.
Expand Down

0 comments on commit 6ad2c6d

Please sign in to comment.