issues
search
anodyne
/
nova3
Next generation online RPG management software
Other
25
stars
4
forks
source link
Navigation
#321
Closed
agentphoenix
closed
2 months ago
agentphoenix
commented
1 year ago
[x] Create navigation item
[x] Update navigation item
[x] Delete navigation item
[x] List all navigation items
[ ] Preview navigation
[ ] Render navigation
Notes
Menus
Name
Icon
Nullable
URL
Nullable
Order column
Type
public / admin
Authorization
How do we hide the menu if the user doesn’t have access?
If there are children, we can check if the user is authorized for any of the children. If they aren’t, we don’t show the menu
What about a situation where there are no children?
Menu items
Which menu is it part of
This lets us know which menu should be open
Active state
Route is … value
request()→routeIs($value)
URL is … value
request()→is($value)
Name
Order column
Authorization
How do we tap in to the policies here where needed and let other menu items use roles / permissions directly?
Policy → which policy?
Role → which role?
Permission(s) → which permission?
$menuItem→authorized()
Authorizable table
authorizable_id
authorizable_type
Menu
Menu item
Page
Type
policy
We would always use the viewAny gate
role
permission
Type value
Notes