You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use check: @if(Auth::user()->hasRole(['administrator']))...@endif multiple time at the same template, i get 10 selects from database select roles.*, role_user.user_id as pivot_user_id, role_user.role_id as pivot_role_id from roles inner join role_user on roles.id = role_user.role_id where role_user.user_id = '1'. Can I do this select once time? P.S.: I check user roles in different place and cannot group them. Thanks!!