Compatibility with auto-routing improved #882
-
Hi, I'm starting with Shield. I have partially implemented a project with "auto-routing improved" enabled and I want to add Shield. I didn't find information about this topic elsewhere. Thank you for your answers! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
If you use Controllers, Filters, and Views provided by Shield, you need to use defined routes for them. If you write controllers that can be autoloaded by "auto-routing improved", it works. Defined routes and Auto-Routing Improved can be used on a per controller basis. |
Beta Was this translation helpful? Give feedback.
-
Hi, I understand defined routes and auto-routing can coexist. But I found some problems extending the register controller, with the routes it tried to redirect me to. It confuses the route structure between defined routes and auto-routing. I also wanted to ask, if I need to use defined routes to make use of "Authorizing via Routes" or it can be used with auto-routes? |
Beta Was this translation helpful? Give feedback.
If you use Controllers, Filters, and Views provided by Shield, you need to use defined routes for them.
But
service('auth')->routes($routes)
defines all routes that are needed.If you write controllers that can be autoloaded by "auto-routing improved", it works.
No problem.
Defined routes and Auto-Routing Improved can be used on a per controller basis.