profile update
This commit is contained in:
@@ -24,6 +24,7 @@ use Spatie\Permission\Traits\HasRoles;
|
||||
* @property null|\Illuminate\Support\Carbon $phone_verified_at
|
||||
* @property string $password
|
||||
* @property string $locale
|
||||
* @property null|array $options
|
||||
* @property bool $active
|
||||
* @property string $remember_token
|
||||
* @property \Illuminate\Support\Carbon $created_at
|
||||
@@ -71,6 +72,7 @@ class User extends Authenticatable
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
'options' => 'array',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -210,4 +212,12 @@ class User extends Authenticatable
|
||||
{
|
||||
return sprintf('/resources/users/%s', $this->id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get option from options
|
||||
*/
|
||||
public function getOption(string $option): null|int|string
|
||||
{
|
||||
return $this->options && array_key_exists($option, $this->options) ? $this->options[$option] : '';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user