'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ahimalayan.localizations' doesn't exist

I'm not a Laravel developer, but I bought a website from CodeCanyon, and this is the error I'm getting.

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ahimalayan.localizations' doesn't exist (SQL: select * from localizations where ip = 223.185.4 limit 1)

And the service provider is not answering much, and I need to upload it asap but he told me to use php artisan migrate:fresh—seed, but I'm not sure where to use it and how to use it. Can anyone please help? I'm a little bit friendly with coding.



Solution 1:[1]

I suggest this steps for your problem :

  1. you need to create a new database in host control panel

  2. Rename example.env file name to .env in main root folder and put new database data inside that. just like this:


    DB_DATABASE=DB NAME
    DB_USERNAME=DB USERNAME
    DB_PASSWORD=DB PASSWORD

  1. then add this line inside routes/web.php file:
    Route::get('migrate', function() {
        \Illuminate\Support\Facades\Artisan::call('migrate:fresh -—seed');
    });
  1. now open this url on your browser to run migrations and seeds. then all required tables will be created automatically and some demo data will be inserted as well.

http://localhost/LaravelFolder/public/migrate

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ali Zamani