diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 7f3de5c4e..bb8ab8618 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -181,8 +181,7 @@ class AppServiceProvider extends ServiceProvider @unlink($publicStoragePath); } elseif (is_dir($publicStoragePath)) { // If it's a directory, we can't safely remove it automatically - // Log a warning instead - \Log::warning('Storage symlink cannot be created: public/storage exists as a directory. Please remove it manually and run: php artisan storage:link'); + // Skip silently - the user is aware of this situation return; } else { @unlink($publicStoragePath); @@ -212,19 +211,16 @@ class AppServiceProvider extends ServiceProvider str_replace('/', '\\', $target) ); @exec($command, $output, $return); - if ($return !== 0) { - \Log::warning('Storage symlink creation failed on Windows. Please run: php artisan storage:link'); - } - } else { - \Log::warning('Storage symlink cannot be created on Windows. Please run: php artisan storage:link'); + // Silently ignore if symlink creation fails on Windows } + // Skip silently if exec is not available on Windows } else { // Unix/Linux - create symlink symlink($target, $link); } } } catch (\Exception $e) { - \Log::warning('Storage symlink creation failed: ' . $e->getMessage() . '. Please run: php artisan storage:link'); + // Silently ignore symlink creation failures } } elseif (is_link($publicStoragePath)) { // Check if symlink is broken (points to non-existent target)