Amir Yousefi
1 min readMay 7, 2020

I updated my source code as a Laravel package.
Using namespace will resolve the issue with controller@method uniqueness. Also, it’s a good idea to use route names, but the name is not a necessary attribute of routes.
In my Laravel permission package, I store both of them. In the next versions, I may check for both the name and the action.

Also, I added two commands to regenerate permissions every time you add a new route or updated your controller structure or routes.
Here is the package:
https://github.com/amiryousefi/laravel-permission