'username' => $this->faker->unique()->userName(),userName()而不是userName
错误原因:1. laravel5.5 中链接数据库时,使用模板对数据库进行关联,多对多操作;一般情况下此模板与数据库名相似,根据上图可以看到数据库名为 statuses,所以模板所在位置 app\models\Status;(模板为单数)如图所示: 。打开文件 ,找到 $fillable,这里是允许对数据库操作的字段,此处明显没有错误中指出的字段,所以将此处...
SQLSTATE[HY000]: General error: 1364 Field 'guard_name' doesn't have a default value (SQL: insert into `roles` (`name`, `updated_at`, `created_at`) values (Test Role, 2017-06-25 19:03:26, 2017-06-25 19:03:26)) I thought, based on the code, the package sets the guard ...
这里的错误是使用了错误的功能。我在模型中使用了getCustomValue(),它应该是getCustomColumns()。替换...
这里的错误是使用了错误的功能。我在模型中使用了getCustomValue(),它应该是getCustomColumns()。替换...
Field 'uuid' doesn't have a default value.failed_jobstable#36273 timurlatypovopened this issueFeb 15, 2021· 6 comments timurlatypovcommentedFeb 15, 2021• edited Laravel Version: 8.26.1 PHP Version: 7.4.11 Database Driver & Version: MYSQL Ver 8.0.21-12 for Linux on x86_64 (Percona ...
SQLSTATE[HY000]: General error: 1364 Field '〇〇' doesn't have a default value すごくシンプルなミスだったのですが、原因はカラム登録のための実装が抜けていたことです。 原因がシンプルなので解決策はカラム登録の実装をすれば良いだけです。
SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value (SQL: insert into `users` Laravel 8 Laravel 5 3,354 Level 1 dev_kassimiOP Posted 4 years ago Migration publicfunctionup(){Schema::create('users', function (Blueprint$t...