We can use hasTable() to check table exists in our database or not.

Syntax

Schema::hasTable('users'); // here users is the table name.

Example

                                        

if(Schema::hasTable('users')) {
   // table is exists
} else {
   // table is not exists
}

Suggest An Answer

No suggestions Available!