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

Wrong id when create a new user #2

Open
JulioAmestica opened this issue Nov 17, 2019 · 1 comment
Open

Wrong id when create a new user #2

JulioAmestica opened this issue Nov 17, 2019 · 1 comment

Comments

@JulioAmestica
Copy link

When create a new user an exception appear because in the moment to create rol select list page put name into value and text.
This will be fix if on UserController.php change the method create to
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
$roles = Role::pluck('name','id')->all();
return view('users.create',compact('roles'));
}

@ganjarsetia
Copy link

When I run the app. I dont see any exception/error when creating new user. Also the ID is fine, the next user ID is 2 (after I seed the admin).
Also when I put roles to the user, there is nothing error.

Perhaps you can show the step to create the user until error.

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

2 participants