Answers for "laravel 6 rename primary key and create column with old name"

PHP
12

laravel migration change column name

Schema::table('users', function (Blueprint $table) {
    $table->renameColumn('from', 'to');
});
Posted by: Guest on April-24-2020
-2

schema add column laravel

Schema::table('users', function($table) {
    $table->string("title");
    $table->text("description");
    $table->timestamps();
});
Posted by: Guest on August-24-2020

Code answers related to "laravel 6 rename primary key and create column with old name"

Browse Popular Code Answers by Language