mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Use Storage facade for user presenter
This commit is contained in:
parent
fa2dfc3e87
commit
1ff7e6b834
|
@ -6,6 +6,7 @@ use App\Helpers\Helper;
|
||||||
use App\Models\Setting;
|
use App\Models\Setting;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class UserPresenter
|
* Class UserPresenter
|
||||||
|
@ -320,8 +321,9 @@ class UserPresenter extends Presenter
|
||||||
public function gravatar()
|
public function gravatar()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if ($this->avatar) {
|
if ($this->avatar) {
|
||||||
return config('app.url').'/uploads/avatars/'.$this->avatar;
|
return Storage::disk('public')->url('avatars/'.e($this->avatar));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Setting::getSettings()->load_remote=='1') {
|
if (Setting::getSettings()->load_remote=='1') {
|
||||||
|
|
Loading…
Reference in a new issue