Avoid bloating routes file with partial namespaces
In the latest version, Laravel has removed automatic namespace prefixing for the controllers. Now you can use class constant to add controllers in routes file.
Very useful for navigating the code, and it can save you some time.
But this comes with a little problem, the route file can become bloated with the namespaces of the controllers.
This has very neat solution, which is partial name-spacing. You can add partial namespace of the controller and append afterwards in the specific route.
Senior Full-stack Engineer | PHP/Laravel/Flutter | Team Leader
4 年Great feature. They just have commented conteroller path in RouterServiceProvidor