Laravel: String data, right truncated: 1406 Data too long for column

后端 未结 6 1573
予麋鹿
予麋鹿 2021-02-04 01:18

I have a table with a column \'hotel\'. The project is created in Laravel 5.4, so I used Migrations.

    $table->string(\'hotel\', 50);

Thi

6条回答
  •  执念已碎
    2021-02-04 01:40

    Change column's datatype from string to text and do not give length.

    $table->text('hotel')->change();
    

提交回复
热议问题