I have built a custom User Permission system into my bosses company app which includes a webcam timeclock for employees as well as pages to run reports from the database and many other company related apps and pages.
The app is built with PHP and Laravel.
In my Laravel routes file I have some sections setup to require Admin user authentication and others to just require and logged in user.
Now that we are expanding the app and I have built a permissions system that will allow setting page access on a per page and per user basis. I need to do away with my Route authentication requirements and instead setup permissions per page using my new permissions settings for each user.
So my question is, how can I go about auto detecting every page.route in the app so that on my permissions page I can show an entry for every page of the app?
In the image below, every page was manually added to a database table. I now need to instead auto-detect all routes in the app.