changed avatar url in both old and new EDIT APIs| removed db raw from road items report| changed url in Randd

This commit is contained in:
2024-10-01 13:12:12 +00:00
parent bc4ae8d3a8
commit 7678ed9298
8 changed files with 17 additions and 14 deletions

View File

@@ -13,6 +13,7 @@ use Spatie\Permission\Traits\HasPermissions;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use App\Models\UserActivityLog;
use App\Models\LogList;
use Illuminate\Support\Facades\URL;
class User extends Authenticatable
{
@@ -232,7 +233,8 @@ class User extends Authenticatable
public function avatarUrl(): ?string
{
$avatar = $this->attributes['avatar'];
return $avatar == null ? null : Storage::disk('public')->url($avatar);
return $avatar == null ? null : URL::to('/') . '/' . $avatar;
}
}