首页 > 代码库 > protected $appends in Laravel

protected $appends in Laravel

 

protected $appends = [‘icon‘];

public function getIconAttribute(){
    return Gravatar::src($this->email, 100).‘&r=g&d=mm‘;
}

 

protected $appends in Laravel