我遇到了这个错误:
SQLSTATE[22007]:无效的日期时间格式:在第1行的“column-name”列中,字符串值“\xBD Inch ...”不正确。
我的数据库、表和列的格式为utf8mb4_unicode_ci,column-name的类型是text和NULL。
这是column-name的值:
[column-name] => 在11 ▒之前有一些文本和其他文本,在之后还有。
然而我希望Laravel给列添加引号,因为这些值是由逗号(,)分隔的。它应该如下所示:
[column-name] => 'Some text before 11 ▒ and other text after, and after.'
请参阅下面的模式
Schema::create('mws_orders', function (Blueprint $table) {
$table->string('custom-id');
$table->string('name');
$table->string('description')->nullable();
$table->string('comment')->nullable();
$table->integer('count')->nullable();
$table->text('column-name')->nullable();
$table->timestamps();
$table->primary('custom-id');
});
我已经在Google上搜索了很久,但没有任何解决方案。
有人有什么想法来解决这个问题吗?
我正在使用Laravel 5.5和MariaDB 10.2.11。