Created
January 9, 2022 12:16
-
-
Save OkubeEmmanuel/79460bb7684275fe70ac04833b51f980 to your computer and use it in GitHub Desktop.
This code snippet helps you create laravel storage symbolic link in CPANEL. Place the code snippet in your web.php file in the routes folder, save and visit the route (yourdomain.tld/storage/link) from your browser and you are set.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Route::get('storage/link',function (){ | |
$target = __DIR__.'/../storage/app/public'; | |
$shortcut = __DIR__.'/../../storage'; | |
symlink($target, $shortcut); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment