Answers for "laravel migration set column description"

PHP
0

laravel migration change column default

Schema::table('users', function ($table) {
    $table->integer('active')->default(0)->change();
});
Posted by: Guest on June-03-2021
-1

how to change the colum type in migration laravel

public function changeColumnType($table, $column, $newColumnType) {                
    DB::statement("ALTER TABLE $table CHANGE $column $column $newColumnType");
}
Posted by: Guest on January-12-2022

Code answers related to "laravel migration set column description"

Browse Popular Code Answers by Language