Register new users stopped working in Laravel Spark after attempting to add email verification
Hello,
I updated my Laravel Spark application from version 7 to 7.1. I then followed the steps here to turn on email verification: https://laravel.com/docs/5.7/upgrade
I was able to get the email verification to work, but now when I try to register new users I get the following error:
SQLSTATE[HY000]: General error: 1364 Field 'password' doesn't have a default value (SQL: insert into `users` (`name`, `email`, `updated_at`, `created_at`) values (test, [email protected], 2018-11-29 19:25:07, 2018-11-29 19:25:07))
My User.php file looks like this:
<?php
namespace App;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Laravel\Spark\CanJoinTeams;
use Laravel\Spark\User as SparkUser;
class User extends SparkUser implements MustVerifyEmail
{
use CanJoinTeams;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name',
'email',
];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = [
'password',
'remember_token',
'authy_id',
'country_code',
'phone',
'two_factor_reset_code',
'card_brand',
'card_last_four',
'card_country',
'billing_address',
'billing_address_line_2',
'billing_city',
'billing_zip',
'billing_country',
'extra_billing_information',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'trial_ends_at' => 'datetime',
'uses_two_factor_auth' => 'boolean',
];
}
Is there a crucial step I missing to make register work again after the update + email verification addition? I don't have any custom registration fields. I am using the default fields from Spark.
I did run make:auth after the update and it created a new 'auth' folder under 'views' that wasn't there before. This new auth folder contains a new register.blade.php that is being used for the register page. I'm not sure if this is related to the issue.
Thank you for your help. Let me know if there is any important information I am missing here.
Please or to participate in this conversation.