<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\Schema; class UserBankInfoColumnAdd extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('users', function ($table) { if (!Schema::hasColumn('users', 'bank_name')) { $table->string('bank_name')->nullable(); } if (!Schema::hasColumn('users', 'branch_name')) { $table->string('branch_name')->nullable(); } if (!Schema::hasColumn('users', 'bank_account_number')) { $table->string('bank_account_number')->nullable(); } if (!Schema::hasColumn('users', 'account_holder_name')) { $table->string('account_holder_name')->nullable(); } }); } /** * Reverse the migrations. * * @return void */ public function down() { // } }