How to check table is exists or not in Laravel?

Posted by LaravelIndia - 3 years ago

syntax:

Schema::hasTable('your_table_name')

Example:

if (Schema::hasTable('users'))
{
    echo 'users table exist';
} else {
    echo 'users table not exist';
}