mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Fix support for authorization using sanctum tokens
This commit is contained in:
@@ -36,6 +36,17 @@ class PersonalAccessToken extends Model implements HasAbilities
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Required for support with Laravel Sanctum.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
* @see \Laravel\Sanctum\Guard::supportsTokens()
|
||||
*/
|
||||
public function tokenable()
|
||||
{
|
||||
return $this->user();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the token has a given ability.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user