Avoid Long Controller Paths In Laravel Routes

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 in top to avoid long controller paths in routes

Leave a Comment