Laravel_Echo_Tutorial icon indicating copy to clipboard operation
Laravel_Echo_Tutorial copied to clipboard

api token not creating on new user sign up

Open jyarali opened this issue 7 years ago • 0 comments

you have defined api_tokens just in factory ('api_token' => str_random(60),) but not in RegisterController. It means if someone signs up from /register route, by default, api_token field will be 'nulll'.

RegisterController.php should be like this: { return User::create([ 'name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'api_token' => str_random(60), ]); }

jyarali avatar Dec 12 '18 19:12 jyarali