I'm trying to make an upload photo feature for my website. However, I can`t access the photos currently as my images folder is being created outside of my public folder. Once I manually move the images into the public folder it works. How can I make it automatically create the images folder inside of the public folder instead of outside it?
CodePudding user response:
Use storage
disk. Just call like this way:
Storage::disk("photo")->getAdapter() . $photoName;
It will save the photo on the directory:
storage/app/public/
After that, don't forget to create the symlink. Just hit the command:
php artisan storage:link