* The attributes that are mass assignable.
* @var array
*/
- protected $fillable = ['name', 'email', 'image_id'];
+ protected $fillable = ['name', 'email', 'image_id', 'books_view_type' ];
/**
* The attributes excluded from the model's JSON form.
if ($imageId === 0 || $imageId === '0' || $imageId === null) return $default;
try {
- $avatar = baseUrl($this->avatar->getThumb($size, $size, false));
+ $avatar = $this->avatar ? baseUrl($this->avatar->getThumb($size, $size, false)) : $default;
} catch (\Exception $err) {
$avatar = $default;
}