profile update

This commit is contained in:
nurmuhammet committed 2025-03-23 23:46:02 +05:00
1 parent d25227867c
commit 785e48d175
5 files changed
+79 -4

No files matched your search

+10
View File
@@ -24,6 +24,7 @@
* @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 @@ public function profilePage(): string
{
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] : '';
}
}