ziccaco/entrust laravel permission and role i cant change a role name

266 Views Asked by At

I'm using this libs for managing roles on my web app: https://github.com/Zizaco/entrust

in the code I use the middleware like:

Route::group(['prefix' => 'admin', 'middleware'=>['auth','role:admin']], function () {

  Route::get('/', 'DdtsController@index');
}

and in templte the blade's function:

 @role('admin')
                <h3>Administration</h3>                
                    <ul class="nav child_menu">
                        <li><a href="/admin/users"> Gestione Utenti</a> </li>
.....
 @endrole

now I'd like to change the name of Admin to something else so I try to edit the db and these functions. As first step i try just to modify the field "display_name", thats as the doc said is even optional! And for me is even enough for my pourpose

  • name — Unique name for the Role, used for looking up role information in the application layer. For example: "admin", "owner", "employee".

  • display_name — Human readable name for the Role. Not necessarily unique and optional. For example: "User Administrator", "Project
    Owner", "Widget Co. Employee".

But no result! only blank page at login! Then I try to modify all the things (db-middleware-@role() function) with the new value...but still blank pages... there are no costumization in auth.login controller. So is about the display_name used or name? and where i can find how the affect my functions?

Laravel version 5.4 with gentellella Admin template.

0

There are 0 best solutions below