while running php artisan eventnotification:mail
in command, it throws below error
"SQLSTATE[42S02]: Base table or view not found: 1146 Table "
My appserviceprovider.php
public function boot() {
$rolesList = $this->getRolesList();
View::share("rolesListArr", $rolesList);
}
My cron job:
protected function schedule(Schedule $schedule)
{
$schedule->command('eventnotification:mail')->everyMinute();
}
How can i fix the " [Illuminate\Database\QueryException] SQLSTATE[42S02]: Base table or view not found: 1146 Table "
Check your migration file, maybe you are using
Schema::table
, like this:If you want to create a new table you must use
Schema::create:
See the Laravel migration documentation for more information.
If you are using Schema::create then please provide the contents of your migration file.