check table for column laravel code example
Example 1: table has column laravel
Schema::hasColumn('users', 'email') // laravel
Example 2: 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...
}