You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
459 B
26 lines
459 B
<?php |
|
|
|
namespace App\Models; |
|
|
|
use Illuminate\Database\Eloquent\Model; |
|
|
|
class ApiToken extends Model |
|
{ |
|
protected $fillable = [ |
|
'name', |
|
'token_prefix', |
|
'token_hash', |
|
'scopes', |
|
'expires_at', |
|
'last_used_at', |
|
]; |
|
|
|
protected function casts(): array |
|
{ |
|
return [ |
|
'scopes' => 'array', |
|
'expires_at' => 'datetime', |
|
'last_used_at' => 'datetime', |
|
]; |
|
} |
|
}
|
|
|