stephen Weru
stephen Weru

Reputation: 103

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wkaranjarealtorsdb.categories' doesn't exist on php artisan migrate

am getting this error when I run PHP artisan migrate when I want to send add the migration tables to the database in my laravel project.already i have created all the migration tables, when I run PHP artisan migrate am getting this error.I haven't figured out where the error is coming from, how can I fix it All the migrations are correct in the folder

Upvotes: -1

Views: 284

Answers (1)

stephen Weru
stephen Weru

Reputation: 103

the issue was in my routes file.this route was the one causing the error

$rentalcatsurls=Rental_category::select('rentalcat_url')->where('status',1)->get()->pluck('rentalcat_url');

foreach($rentalcatsurls as $url)
{
    Route::get('/'.$url,[Rentalslisting_controller::class,'rentalcategory_list'])->name('rentalcategory.list');
}

Upvotes: 0

Related Questions