How to create symlink for storage if that needs to be done through controller.
I tried Artisan::call(‘storage:link’); in my controller it creates a symlink in public folder for storage but gives an error “Can’t change directory to storage: No such file or directory”
And don’t forget to use App
Another example like as to create the symbolic link, you may use the
php artisan storage:link
Of course, once a file has been stored and the symbolic link has been created, you can create a URL to the files using the asset helper: