mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
Add filament resource for tokens; Ignore non-personal tokens in API token endpoints
This commit is contained in:
committed by
Constantin Graf
parent
69a8c8bb2b
commit
ae76135373
@@ -6,6 +6,7 @@ namespace App\Models\Passport;
|
||||
|
||||
use Database\Factories\Passport\TokenFactory;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Laravel\Passport\Token as PassportToken;
|
||||
|
||||
@@ -24,4 +25,14 @@ class Token extends PassportToken
|
||||
{
|
||||
/** @use HasFactory<TokenFactory> */
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* Get the client that the token belongs to.
|
||||
*
|
||||
* @return BelongsTo<Client, Token>
|
||||
*/
|
||||
public function client(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Client::class, 'client_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user