Skip to content

Instantly share code, notes, and snippets.

@OkubeEmmanuel
OkubeEmmanuel / gist:79460bb7684275fe70ac04833b51f980
Created January 9, 2022 12:16
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);
});