fixed the explore page
This commit is contained in:
1 parent
fba93887ad
commit
f534e10977
17 files changed
+524
-201
No files matched your search
@@ -63,6 +63,7 @@ class User extends Authenticatable
|
||||
'addresses' => 'array',
|
||||
'social_links' => 'array',
|
||||
'media_gallery' => 'array',
|
||||
'mobile' => 'array',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -152,6 +153,21 @@ class User extends Authenticatable
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the formatted mobile number.
|
||||
*/
|
||||
protected function mobileFormatted(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: function () {
|
||||
if (!$this->mobile || !is_array($this->mobile) || empty($this->mobile['code'] ?? '') || empty($this->mobile['number'] ?? '')) {
|
||||
return null;
|
||||
}
|
||||
return ($this->mobile['code'] ?? '') . ' ' . ($this->mobile['number'] ?? '');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the dependents for the user.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user