Closed ampmonteiro closed 8 months ago
So I hear you. It is frustrating and I've run into it a few times myself as well. The problem is that I have to maintain backwards compatibility with the framework. In v4, we can totally do that so it's a getKey() setKey() type situation to allow for Flight::get() to be meant for a route.
Your alternative that you could do is you could call $router = Flight::router()
to get the router and then you can do group()
, get()
, post()
, etc as expected.
Hi,
ok, so please do it in the next major version.
Thanks, feel free to close the issue.
Hi,
Even if you in the docs to not use
Flight::get()
to set a get router soon or later someone will do this mistake.As such and to be consistent
Flight::get()
should be rename, for example toFlight::getKey
and let to useFlight::get()
be a route definition, similar to frameworks like laravel.Thanks