[Clien Portal] Alarm Center - Service Monitoring
This commit is contained in:
@@ -394,22 +394,22 @@ class Member extends Model
|
||||
// );
|
||||
// }
|
||||
|
||||
protected function corporateLogo(): Attribute
|
||||
{
|
||||
$avatar = null;
|
||||
// protected function corporateLogo(): Attribute
|
||||
// {
|
||||
// $avatar = null;
|
||||
|
||||
if ($this->relationLoaded('currentPolicy')) {
|
||||
$corporateId = $this->currentPolicy->corporate->id;
|
||||
$avatar = File::where(['type' => 'avatar', 'fileable_id' => $corporateId])
|
||||
->orderBy('id', 'desc')
|
||||
->first();
|
||||
}
|
||||
// if ($this->relationLoaded('currentPolicy')) {
|
||||
// $corporateId = $this->currentPolicy->corporate->id;
|
||||
// $avatar = File::where(['type' => 'avatar', 'fileable_id' => $corporateId])
|
||||
// ->orderBy('id', 'desc')
|
||||
// ->first();
|
||||
// }
|
||||
|
||||
$path = $avatar ? $_ENV['LMS_APP_STORAGE'] . $avatar->path : '';
|
||||
// $path = $avatar ? $_ENV['LMS_APP_STORAGE'] . $avatar->path : '';
|
||||
|
||||
return Attribute::make(
|
||||
get: fn () => $path
|
||||
);
|
||||
}
|
||||
// return Attribute::make(
|
||||
// get: fn () => $path
|
||||
// );
|
||||
// }
|
||||
/* -------------------------------------------------------------------------- */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user