mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
24 lines
482 B
PHP
24 lines
482 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\Traits\NexusActivityLogTrait;
|
|
use Illuminate\Support\Str;
|
|
use Laravel\Passport\Client;
|
|
|
|
class OauthClient extends Client
|
|
{
|
|
use NexusActivityLogTrait;
|
|
|
|
protected static function booted(): void
|
|
{
|
|
static::creating(function (OauthClient $model) {
|
|
$model->secret = Str::random(40);
|
|
});
|
|
}
|
|
public function skipsAuthorization(): bool
|
|
{
|
|
return (bool)$this->skips_authorization;
|
|
}
|
|
}
|