I am working with laravel and I am in the roles and permissions stage of my application.
In my table of users, add the one field called role.
If role = 1 then he is an administrator
if role = 2 then it is a normal user.
I would like you to agree to the type of role you logged in to see different options in the menu. I hope you can help me
My view of the menu is as follows:
@if (Auth::guest())
<li><a href="{{ url('/login') }}">Inicio de sesión</a></li>
@else
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Alumnos <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{ url('/alumno') }}">Alumnos inscritos</a></li>
<li><a href="{{ url('/alumno2') }}">Grados </a></li>
<li><a href="{{ url('/alumno3') }}">Materias</a></li>
</ul>
</li>
@endif