Skip to main content

How to solve Problem with Image Loading?

If you have available terminal at Server then, run command below -

php artisan storage:link

Otherwise,

Step 1: Navigate to Project Routes

  • Go to the project directory.
  • Open the routes folder.
  • Access the web.php file. Step 1 - Routes

Step 2: Add Import Statement

  • Inside the web.php file, add the following import statement:
       use Illuminate\Support\Facades\Artisan;
    Step 2 - Import

Step 3: Implement Code

  • Insert the following code snippet into the web.php file:

       Route::get('/create-storage-link', function () {
    // Execute the storage:link command
    Artisan::call('storage:link');

    // Redirect back or return a success message
    return 'Storage link created successfully!';
    });

    Step 3 - Create Link