how to make migration to drop column if exist code example
Example: laravel drop column if exists
if (Schema::hasColumn('users', 'phone')) {
Schema::table('users', function (Blueprint $table){
$table->dropColumn('phone');
});
}
if (Schema::hasColumn('users', 'phone')) {
Schema::table('users', function (Blueprint $table){
$table->dropColumn('phone');
});
}