Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel check if table has column

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 #check #table #column
ADD COMMENT
Topic
Name
1+2 =