You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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), ]); }
The text was updated successfully, but these errors were encountered:
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), ]); }
The text was updated successfully, but these errors were encountered: