Laravel-adminlte: Hidden Header in menu

Created on 30 Sep 2016  路  1Comment  路  Source: jeroennoten/Laravel-AdminLTE

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',
            ],
        ],
    ],

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:

[
    '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.

>All comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bbdangar picture bbdangar  路  5Comments

Basili0 picture Basili0  路  5Comments

claytongf picture claytongf  路  5Comments

eraporsmk picture eraporsmk  路  5Comments

fagnerfjas picture fagnerfjas  路  5Comments