laravel check if schema::table has code example
Example 1: laravel has table
Schema::hasTable('mytable');
Example 2: check table exists in db laravel
if (!Schema::hasTable('table_name')) {
// Code to create table
}
Schema::hasTable('mytable');
if (!Schema::hasTable('table_name')) {
// Code to create table
}