Now, we will learn how create symbolic link in a shared hosting using PHP
In Laravel documentation, a symbolic link (symlink or soft link) from public/storage to storage/app/public should be created to make files accessible from the web.
Create a symlink.php file:
$targetFolder = '/home/your_account/your_project_src/storage/app/public'; $linkFolder = '/home/your_account/your_domain.com/storage'; symlink($targetFolder, $linkFolder); echo 'Symlink process successfully completed';
Upload to public_html or your domain folder and run this symlink.php file:
Done! A folder named storage will be created to link path with an indicator >>> on the folder icon.