Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save OkubeEmmanuel/79460bb7684275fe70ac04833b51f980 to your computer and use it in GitHub Desktop.
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.
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