I have added a column for activation token in my users table and I want to add this random string when inserting new users.
So in my AuthController i have this:
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
'activation_token' => str_random(60),
]);
}
The user get's registered but the activation_token column remains empty??? What am I doing wrong?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire