I changed the adminlte.php to display the item only with permission. But when the user does not permit it shows the header without options wanted to hide it well.
'ROLES / PERMISSIONS', // want hidden this in my template.
[
'text' => 'Roles',
'icon' => 'unlock-alt',
'permission' => 'approve', // if permission is deny
'submenu' => [
[
'text' => 'All roles',
'url' => 'dashboard/roles',
],
[
'text' => 'New role',
'url' => 'dashboard/roles/create',
],
],
],
Good question. It resulted in a new release. If you update to version 1.15, you will be able to conditionally show headers as well:
[
'header' => 'ROLES / PERMISSIONS',
'can' => 'manage-blog'
]
See the documentation for the updated Laratrust code example, then you can replace can with permission in the example above.
Most helpful comment
Good question. It resulted in a new release. If you update to version 1.15, you will be able to conditionally show headers as well:
See the documentation for the updated
Laratrustcode example, then you can replacecanwithpermissionin the example above.