Route::get('/linkstorage', function () {
$targetFolder = base_path().'/storage/app/public';
$linkFolder = $_SERVER['DOCUMENT_ROOT'].'/storage';
symlink($targetFolder, $linkFolder);
});
Adding this inside web.php and then hit this 'BASE_URL/linkstorage' url once.
now check the storage folder will be created inside the public folder. This will
resolve your issue.
1. Go to /public directory remove /storage folder
2. run command
ln -s /AnotherAppName/storage/app/public/ /AnotherAppName/public/storage
------------- OR RUN ---------------------
php artisan storage:link
Route::get('/linkstorage', function () {
$targetFolder = base_path().'/storage/app/public';
$linkFolder = $_SERVER['DOCUMENT_ROOT'].'/storage';
symlink($targetFolder, $linkFolder);
});
Adding this inside web.php and then hit this 'BASE_URL/linkstorage' url once.
now check the storage folder will be created inside the public folder. This will
resolve your issue.
1. Go to /public directory remove /storage folder
2. run command
ln -s /AnotherAppName/storage/app/public/ /AnotherAppName/public/storage
------------- OR RUN ---------------------
php artisan storage:link