mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
Use UrlGenerator to get avatar URL
This commit is contained in:
parent
b91ca93e09
commit
61bea371ab
|
@ -256,7 +256,7 @@ class User extends Model
|
|||
*/
|
||||
public function getAvatarUrlAttribute()
|
||||
{
|
||||
return $this->avatar_path ? asset('assets/avatars/'.$this->avatar_path) : null;
|
||||
return $this->avatar_path ? app('Flarum\Http\UrlGeneratorInterface')->toAsset('assets/avatars/'.$this->avatar_path) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user