Answers for "mysql alter column laravel"

PHP
2

laravel change column

Schema::table('users', function (Blueprint $table) {
    $table->string('name', 50)->nullable()->change();
});
Posted by: Guest on April-02-2020
-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

Browse Popular Code Answers by Language