Answers for "how to change a column type in laravel"

PHP
1

laravel change column

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

laravel change column type

composer require doctrine/dbal

public function up()
{
    Schema::table('sometable', function (Blueprint $table) {
        $table->text('text')->change();
    });
}
Posted by: Guest on August-16-2021

Code answers related to "how to change a column type in laravel"

Browse Popular Code Answers by Language