laravel migration remove column
public function up()
{
Schema::table('table', function($table) {
$table->dropColumn('column_name');
});
}
laravel migration remove column
public function up()
{
Schema::table('table', function($table) {
$table->dropColumn('column_name');
});
}
laravel drop multiple columns
// You may drop multiple columns from a table by passing an array of column
// names to the dropColumn method. Before dropping columns from a SQLite DB,
// you will need to add the doctrine/dbal dependency to your composer.json file
// and run the composer update command in your terminal to install the library:
Schema::table('users', function (Blueprint $table) {
$table->dropColumn(['votes', 'avatar', 'location']);
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us