I want to create and store a verify token in the database to activate the user's account after registration. But I'm getting the above error. Can you help please.
Users Table
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('phone',10)->unique();
$table->string('password');
$table->string('verifyToten');
$table->boolean('is_active')->default(0);
$table->timestamp('email_verified_at')->nullable();
$table->rememberToken();
$table->timestamps();
});
User model
protected $fillable = [
'name', 'email', 'phone', 'password','verifyToten'
];
Register Controller
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'phone' => $data['phone'],
'password' => bcrypt($data['password']),
'verify_token' => Str::random(40),
]);