Search
 
SCRIPT & CODE EXAMPLE
 

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']);
});
Comment

PREVIOUS NEXT
Code Example
Php :: check is array laravel 
Php :: cascade laravel 
Php :: laravel eloquent get 3 months 
Php :: echo session 
Php :: how to separate date and time in laravel 
Php :: scan all directories and files php 
Php :: remove all spaces php 
Php :: php goto 
Php :: image exists in laravel 
Php :: php déclarer une constante URL 
Php :: validate time in laravel 
Php :: Carbon Format date with timezone in views Laravel 
Php :: Laravel Unable to migrate or Make Seeds 
Php :: array filter use key 
Php :: laravel check collection has key 
Php :: laravel mongodb delete 
Php :: laravel drop column if exists 
Php :: PHP CSV File Export Using fputcsv() 
Php :: php chunk array 
Php :: wordpress get perma link 
Php :: wp revisions config 
Php :: how to count no of words in a string in php without using string functions 
Php :: create a user using tinker 
Php :: laravel create model with migration 
Php :: php check if function exists 
Php :: how to add title to wordpress php 
Php :: laravel eloquent get last record 
Php :: php get array key by value multidimensional 
Php :: string into integer php 
Php :: laravel faker title 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =