Laravel : Integrity constraint violation
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a SQLSTATE Integrity constraint violation error with the default register form. I have a add a rank row to a new table. Here's my migration; Schema::create('users', function(Blueprint $table) { $table->increments('id'); $table->string('name'); $table->string('email')->unique(); $table->string('password', 60); $table->string('rank'); $table->rememberToken(); $table->timestamps(); }); I want that the server send the value of default , so I add this to \app\Services\Registrar.php ; public function create(array $data) { return User: