fix(model): add guarded

This commit is contained in:
FoskyM 2023-10-01 17:16:45 +08:00
parent 8e8f49ae87
commit 8ad3fd087f
No known key found for this signature in database
GPG key ID: 42C0ED6994AD7E9C
6 changed files with 5 additions and 2 deletions

View file

@ -15,4 +15,5 @@ use Flarum\Database\AbstractModel;
class AccessToken extends AbstractModel
{
protected $table = 'oauth_access_tokens';
protected $guarded = [];
}

View file

@ -15,4 +15,5 @@ use Flarum\Database\AbstractModel;
class AuthorizationCode extends AbstractModel
{
protected $table = 'oauth_authorization_codes';
protected $guarded = [];
}

View file

@ -15,7 +15,6 @@ use Flarum\Database\AbstractModel;
class Client extends AbstractModel
{
protected $table = 'oauth_clients';
protected $guarded = [];
public static function build(string $client_id, string $client_secret, int $user_id)

View file

@ -15,4 +15,5 @@ use Flarum\Database\AbstractModel;
class Jwt extends AbstractModel
{
protected $table = 'oauth_jwt';
protected $guarded = [];
}

View file

@ -15,4 +15,5 @@ use Flarum\Database\AbstractModel;
class RefreshToken extends AbstractModel
{
protected $table = 'oauth_refresh_tokens';
protected $guarded = [];
}

View file

@ -15,7 +15,7 @@ use Flarum\Database\AbstractModel;
class Scope extends AbstractModel
{
protected $table = 'oauth_scopes';
protected $guarded = [];
static public function get_path_scope($path = '')
{
return self::where('resource_path', 'like', $path . '%')->first();