laravel 체크인 경우 테이블이 열
if (Schema::hasTable('users')) {
// The "users" table exists...
}
if (Schema::hasColumn('users', 'email')) {
// The "users" table exists and has an "email" column...
}
체크인 테이블에 존재하는 db laravel
if (!Schema::hasTable('table_name')) {
// Code to create table
}
laravel 마이그레이션을 확인하는 경우에는 테이블은 열
// You may check for the existence of a table or column
// using the hasTable and hasColumn methods:
if (Schema::hasTable('users')) {
// The "users" table exists...
}
if (Schema::hasColumn('users', 'email')) {
// The "users" table exists and has an "email" column...
}