/** * @return mixed */ public function avatar() { return $this->entity->getFirstMediaUrl('profile', 'square') ?: Avatar::create($this->fullname())->toBase64(); }
public function getAvatar() { return Avatar::create($this->name)->toBase64(); }