Handyman Service - Documentation
Handyman Services

How to solve Problem with Image Loading


If you have access to the Terminal/SSH on your server, please follow the steps below:

1. Open the Terminal / SSH of your server.

2. Navigate to your Laravel project directory:

cd /path/to/your/laravel-project

3. Run the storage link command:

php artisan storage:link

4. If the storage link already exists and you receive an error, remove the existing link and recreate it:

rm public/storage
php artisan storage:link

5. Clear the Laravel cache:

php artisan optimize:clear

6. Finally, refresh the website and Android app and check whether the images and icons are displaying correctly.

Important: Please make sure the commands are executed from the Laravel project root directory, where the artisan file is located.

Otherwise,

Step 1: Navigate to Project Routes

  • Go to the project directory.
  • Open the routes folder.
  • Access the web.php file.

Step 2: Add Import Statement

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

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!';
});