namespace App;
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
/**
* The accessors to append to the model's array form.
*
* @var array
*/
protected $appends = ['avatar_url'];
public function getAvatarUrlAttribute()
{
return \Storage::url( $this->avatar );
}
}