check table exists in db laravel laravel if database has table check table exists in db laravel

The solution for “check table exists in db laravel laravel if database has table check table exists in db laravel” can be found here. The following code will assist you in solving the problem.

if (!Schema::hasTable(‘table_name’)) {
// Code to create table
}if (Schema::hasTable(‘users’)) {
// The “users” table exists…
}

if (Schema::hasColumn(‘users’, ’email’)) {
// The “users” table exists and has an “email” column…
}FOR LUMEN FOR migrate job
BOOTSTRAP/APP.PHP

if(\Illuminate\Support\Facades\Schema::hasTable(“jobs”))
Queue::push(new ProcessCenterJob());

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in