You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->onRest('req.get.customname.render', function() {
// return the filtered data found (complex formating is not necessary in this example, just return the found results).
});
But it seems never triggering the model events or the model instantiating. I didn't found any example regarding how to use the events functionality when working with custom routes. What is the proper way to approach it?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Because you are creating a custom request the action has no idea what you are trying to do with your model thus you will have to create do it yourself. You can do it in the render or pre-render
Once I added the code for pre.filter.req.get.customname.render I'm getting the following error:
Too few arguments to function ControllerNamerController::{closure}(), 2 passed in \/var\/www\/app\/protected\/vendor\/starship\/restfullyii\/starship\/RestfullYii\/events\/Eventor\/Eventor.php on line 170 and at least 4 expected
It is a hard thing to understand. What are the necessary arguments and what function requires it? Being frank it seems impossible to identify what happened and how to fix it or even to know what params are expected for what function.
@evan108108 I have added a custom request like:
And calling it like:
But it seems never triggering the model events or the model instantiating. I didn't found any example regarding how to use the events functionality when working with custom routes. What is the proper way to approach it?
Thanks in advance.
The text was updated successfully, but these errors were encountered: