Support the ongoing development of Laravel.io →
Views Blade
Last updated 8 months ago.
0

I solved this way:


        <?php 
          if (Auth::user()->ability('Admin',array('read'),$options = array('validate_all' => true))) {
            echo("<li><a href='#'><span class='glyphicon glyphicon-certificate'></span>Hello</a></li>");
          }
        ?>

Admin is my role and read is my permission, if user have this role and permission the item will appear

Last updated 8 months ago.
0

Sign in to participate in this thread!

LaraJobs

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2023 Laravel.io - All rights reserved.