Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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...
}
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #database #table
ADD COMMENT
Topic
Name
3+5 =