Laravel: String data, right truncated: 1406 Data too long for column
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a table with a column 'hotel'. The project is created in Laravel 5.4, so I used Migrations. $table->string('hotel', 50); This is MYSQL VARCHAR (50). It was working good, because when I was developing I used short hotel names like "HILTON NEW YORK 5 "*. Now the project is on production and customer asked why they can't input long hotel names. I've tested it with such a mock hotel name as "Long long long long long long long long long and very-very-very long hotel name 5 stars" It gave me an error: "SQLSTATE[22001]: String data, right