Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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']);
});
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #drop #multiple #columns
ADD COMMENT
Topic
Name
8+4 =