V2, better design, more functionalities.
This commit is contained in:
@@ -10,4 +10,13 @@ class Personalia extends Model
|
||||
protected $casts = [
|
||||
'hidden' => 'boolean',
|
||||
];
|
||||
|
||||
public function image()
|
||||
{
|
||||
return $this->getFirstMedia('image');
|
||||
}
|
||||
public function imageUrl()
|
||||
{
|
||||
return $this->image() ? $this->image()->getUrl() : null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user