mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 09:11:40 +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…
x
Reference in New Issue
Block a user