Laravel जाँच स्तंभ मौजूद है

कोड उदाहरण

3
0

laravel ड्रॉप स्तंभ अगर मौजूद है

if (Schema::hasColumn('users', 'phone')) {
 	Schema::table('users', function (Blueprint $table){
       $table->dropColumn('phone');
    });
}
0
0

laravel अगर जाँच तालिका में स्तंभ

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

if (Schema::hasColumn('users', 'email')) {
    // The "users" table exists and has an "email" column...
}
0
0

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...
}

इसी तरह के पन्ने

उदाहरणों के साथ समान पृष्ठ

अन्य भाषाओं में

यह पृष्ठ अन्य भाषाओं में है

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................