31 lines
700 B
PHP
31 lines
700 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Laravel\Passport\Client;
|
|
|
|
#[Fillable(['user_id', 'client_id', 'outcome', 'scopes', 'ip_address', 'user_agent', 'created_at'])]
|
|
class OAuthAuthorizationEvent extends Model
|
|
{
|
|
const UPDATED_AT = null;
|
|
|
|
protected $table = 'oauth_authorization_events';
|
|
|
|
protected $casts = [
|
|
'scopes' => 'array',
|
|
];
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
|
|
public function client(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Client::class);
|
|
}
|
|
}
|