Injecting a model instance into a controllers action
1 year ago by: matt
This is a continuation/update from my Phalcon PHP route model binding post. My pull request has since been merged and made its way into Phalcon 3.0.0. This is taken from the documentation I wrote for this feature here.
From 3.0.x onwards the dispatcher comes with an option to handle this internally for all models passed into a controller action.
use Phalcon\Mvc\Dispatcher;
$dispatcher = new Dis...
- Github
- LinkedIn
- Youtube