-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make actions map configurable #19
Comments
Elaborate, please. What do you mean by configurable? |
I'd like to put those into the config file cause i change 'get' by 'index'
|
Well, they are configurable on per-Controller basis, so they're as configurable as you can get (and keep sensible about it). They're set in my abstract Controller class as an example, but each Controller you create should have its own set of actions defined in I'm sorry, but I just don't see any reason to move what is essentially a class property to a separate config file. Keeping it within Controller just makes it more readable without making any less configurable. |
I agree but all my controllers works the same way so i'll have to modify all of them with the same code, which is ... kind of bad. |
But this doesn't mean my approach is bad, does it? You chose different one - fair enough - but if you want to stick with it means more work for you. I used You can always create your own abstract RESTful Controller that extends mine but changes the default |
Your approach is not bad but I wonder why a config is problematic for you. Routing with action_index for GET methods is often used by Kohana users (default routing) I'll probably change all my controllers, or as your said, extends your controller. I still think something like this would be interesting in order to make this module more easy to use and to configure:
and then in your controller
This is not tested. Have a great day! |
I see your point and while we're discussing it I think I've come up with a better, completely different way to handle the issue. I might actually implement it overnight and I'm reopening this issue. |
Overnight O_o Happy coding, i'm eager to see your code. |
No worries - I need it ;) (it's 10pm here btw.) |
Oh, 10pm, still early =) Well, have fun, i'm going to diner 17h15 over here. I'm hungry! See ya! |
… used when filtering api request routes closes #19
It would be nice to make this configurable
The text was updated successfully, but these errors were encountered: