thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.78k stars 2.67k forks source link

MenuItemPolicy fails with edit page urls #3443

Open brnogz opened 6 years ago

brnogz commented 6 years ago

Version information

Description

When a route with parameters or a static url which include more than 1 segment added to admin menu, policy fails to check permission because slug fetched wrong (like pages1edit instead of pages)

fletch3555 commented 6 years ago

We don't recommend providing links to edit pages, since those rely on IDs that could change.

However, I understand how this could be counter-intuitive, so we're open to PRs to fix it.