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

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


You need to create a new migration, register it with composer du command and run php artisan migrate command to change type of the column:

Schema::table('the_table_name', function (Blueprint $table) {    $table->string('hotel', 255)->change();});


On your local development, try changing the column type to:

$table->longText('columnName')

from your migration file. That solved it for me. But if you have gone live, then create a new migration just as Alexey has suggested and then use longText() column type.


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