Answers for "laravel check if has table"

PHP
0

laravel if database has table

if (Schema::hasTable('users')) {
    // The "users" table exists...
}

if (Schema::hasColumn('users', 'email')) {
    // The "users" table exists and has an "email" column...
}
Posted by: Guest on January-18-2021

Code answers related to "laravel check if has table"

Browse Popular Code Answers by Language