I am having a problem creating a shortcut folder. I am trying to host a Laravel project. I looked at these methods to get rid of /public in the URL .
And it works but now I am having a issue creating a shortcut folder of storage in the public folder to access the uploaded content publicly. Using FTP client when I tried to upload a shortcut folder it uploads the whole original location folder.
Thanks admin for the reply.
Yeah I get that I cannot create a shortcut folder here. But I solved that issue. Here’s how:
Why do we need a shortcut in Laravel in the first place??
Because the files that we upload are stored in the storage folder which cannot be accessed publicly. So we created the shortcut of storage in the public folder to access them.
How about we directly save the files in the public directly. By default, Laravel store files in the storage but we can change that in config/filesystems.php .
Now the storage is changed to public directory. No need to change anything in controller. Now anything you upload should be uploaded in public/storage/.... directory.