Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api token not creating on new user sign up #3

Open
jyarali opened this issue Dec 12, 2018 · 0 comments
Open

api token not creating on new user sign up #3

jyarali opened this issue Dec 12, 2018 · 0 comments

Comments

@jyarali
Copy link

jyarali commented Dec 12, 2018

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 jyarali closed this as completed Dec 12, 2018
@jyarali jyarali reopened this Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant