Answers for "edit column with migration in laravel"

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
0

migration rename column laravel

public function down()
{
    Schema::table('posts', function (Blueprint $table) {
        $table->renameColumn('user_id', 'author_ID');
    });
}
Posted by: Guest on February-09-2021

Code answers related to "edit column with migration in laravel"

Browse Popular Code Answers by Language