Roles Management

The Admin user has access to a roles management table page.


The PRO version lets you add roles to the user. The default roles are Admin, Creator and Member. The user management can be accessed by clicking Roles Management from the Laravel Examples section of the sidebar or adding /laravel-roles-management in the url. This page is available for users with the Admin role and the user is able to add, edit and delete other users. For adding a new role you can press the + New Role button or add in the url /laravel-new-role. If you would like to edit or delete an user you can click on the Action column. It is also possible to sort the fields or to search in the fields.

On the page for adding a new role you will find a form which allows you to fill the name and the description of the new role.

The `App\Http\Livewire\LaravelExample\NewRole` takes care of data validation and creation of a the new role:

              
                public function addRole() {
                    $this->validate();
                    Role::create([
                        'name' => $this->name,
                        'description' => $this->description
                    ]);
                    $this->showSuccesNotification = true;
                    $this->reset(['name', 'description']);
                }