How can I rename column in laravel using migration?

前端 未结 6 648
名媛妹妹
名媛妹妹 2020-12-04 20:55

I have columns as mentioned bellow:

public function up()
{
    Schema::create(\'stnk\', function(Blueprint $table)
    {
        $table->increments(\'id\         


        
6条回答
  •  执念已碎
    2020-12-04 21:06

    The above answer is great or if it will not hurt you, just rollback the migration and change the name and run migration again.

     php artisan migrate:rollback
    

提交回复
热议问题