samedi 27 février 2021

Laravel storage images

My images were working fine, but right now i have a problem with my storage directory.

Before they were going here :

enter image description here

But now they are going here :

enter image description here

My code Profile Controller :

        if($r->hasFile('profile_avatar')){
            Auth::user()->update([
            'profile_avatar' => $r->profile_avatar->store('public/avatars')
            ]);
        }

        if($r->hasFile('banner')){
            Auth::user()->profile()->update([
            'banner' => $r->banner->store('public/avatars')
            ]);
        }

        Session::flash('success', 'Perfil Atualizado com Sucesso!');
        return redirect()->back();
    }

This was working before, but right now it doesnt show any picture

 <img src="" width="400px" height="400px" style="border-radius: 50%; display: inline-block" alt="" class="unselectable">



Aucun commentaire:

Enregistrer un commentaire