php - Navigation Links Admin Panel with Laravel -
i'm attempting seek , create sidebar within dashboard cms project creating laravel different links various pages. of these links require logged in user have role see them in sidebar , able visit them if seek , access them directly.
i'm trying figure out sort of things should doing can see pages based on role_id , block them seeing them if seek , visit page directly.
my initial thought seek , set if statements everywhere becomes more of problem more have different links.
lets have next roles , id's roles.
id - role_name 1 basic user 2 editor 3 admin 4 super admin
lets have next nav structure.
dashboard category 1 link 1 link 2 category 2 link 3 link 4 link 5 link 6 category 3 link 7 link 8 link 9 link 10
is there improve way handle navigation links requirements of role ids putting whole bunch of if statements on code?
php laravel laravel-4 content-management-system
No comments:
Post a Comment