From 4b5367511fee53d64278d38974eeae765b313c44 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 17 Jun 2015 12:48:01 +0930 Subject: [PATCH] Use UrlGenerator to get avatar URL --- framework/core/src/Core/Models/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/Core/Models/User.php b/framework/core/src/Core/Models/User.php index f5521f9d2..eb3e8b830 100755 --- a/framework/core/src/Core/Models/User.php +++ b/framework/core/src/Core/Models/User.php @@ -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; } /**