How to Change a Column Name in Laravel Migration
In this lesson, we are going to see how to change a column name in Laravel migration, the renameColumn method is used to rename an existing column.
The renameColumn method
The renameColumn method is used to rename an existing column.
Schema::table('users', function (Blueprint $table) {
$table->renameColumn('phone', 'phone_number');
});