Answers for "how to change name table laravel"

PHP
12

laravel migration change column name

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

migration rename column laravel

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

how to rename a table element in laravel

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

Code answers related to "how to change name table laravel"

Browse Popular Code Answers by Language