Support the ongoing development of Laravel.io →
posted 10 years ago
Configuration
Last updated 1 year ago.
0

You could do that but it's not a good idea at all, your application becomes dependant on your "clever" routing (forcing Laravel to guess based on the URL which method on what controller should be executed, instead of telling Laravel explicitly) and loses a lot of flexibility.

If you absolutely must do it you could use RESTful controllers which is a middle ground (you need to define your controllers as part of your routes, but not the individual methods) or you could write your own function that parses the URL to determine the controller and method, but it's not a good idea.

Last updated 1 year ago.
0

citricsquid said:

Forcing Laravel to guess based on the URL which method on what controller should be executed.

Therefore making the performance a little bit slower ON EACH REQUEST.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

jifei jifei Joined 24 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.