Open
Description
Q | A |
---|---|
Bug? | yes |
New Feature? | no |
Framework | Laravel |
Framework version | 5.3+ |
Package version | 2.0.0-alpha1 |
PHP version | 7.2.11 |
Actual Behaviour
My controller constructors are being called twice. It appears that there are two different instantiations of the Controller taking place upon execution.
Expected Behaviour
One instance of controller being instantiated.
Steps to Reproduce
- Laravel 5.7 installation + dingo 2.0.0-alpha1
- Create new controller and define a constructor with an echo statement
- Add route to new controller method.
- Load page at route defined above. You will see constructor output twice.
Possible Solutions
This is probably not correct, but currently I have had to convert Route.php line 283 to:
$this->container->instance($this->controllerClass, $this->controller);