I have this page that uploads the user's avatar to the the app. I'm using Livewire 3, so it should be simple.
// validation $user->avatar = $this->photo->store('avatars'); $user->save(); Now, this works, but instead of storing the file in /storage/app/public/avatar it uploads it to /storage/app/avatar so I can't see the files in the browser. Field in the database has the hash and file extension, so it's working, and if I go directly to the directory, of course they're there.
This won't work:
avatar }}"> neither
avatar }}"> But if I manually move the /avatar directory inside /storage/app/public, it works.
This must be a configuration issue for sure, but I don't know what. I don't find it in the Laravel documentation or Livewire's, it should be working like magic, but it's not.
Thanks!
Источник: https://stackoverflow.com/questions/780 ... l-livewire