1.

How to check table is exists or not in our database using Laravel?

Answer»

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
}



Discussion

No Comment Found