Avoid Long Controller Paths In Laravel Routes

56 / 100

Laravel tip of the day. to avoid long controller paths in routes, you can not only put “use” with full controller names on top but use namespaces on top. Then, in the route, you just need to mention the last part of that namespace.

avoid long controller paths in routes
Example: use namespaces at top to avoid long controller paths in routes
Hassam
Hassam

I am passionate about open-source software, privacy, best practices, standards, user experience, and developer experience. My favorite stack these days are Laravel, Vue, and Tailwind. And focusing on Solid Principles, Data Structures, and Design Patterns.

Articles: 23

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *