简体   繁体   中英

Admin create Users in Laravel

I have a admin panel called 'master'. Using this panel, I want to register new users with different roles.

For example, I want to register two new users, named 'John' and 'Alex' with their roles as 'Sales' and 'HR', respectively.

Is it possible in Laravel 5.8, if so, how?

My user registration form in master looks something like this, click here to see the image

What is the exact issue you're getting as your problem is not specific. It seems like you are trying to create 2 users with the given form. Below steps you can follow:

  1. provide a drop down for roles in UI with values like "sales", "HR".
  2. You have to create tables for roles and users through migrations.
  3. Get request in controller and use models to insert into tables.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM