Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5f4cd97 + 5fe8ab3 commit 12a55a8Copy full SHA for 12a55a8
1 file changed
src/Illuminate/Routing/Router.php
@@ -323,7 +323,16 @@ public function resources(array $resources)
323
*/
324
public function resource($name, $controller, array $options = array())
325
{
326
- (new ResourceRegistrar($this))->register($name, $controller, $options);
+ if ($this->container && $this->container->bound('Illuminate\Routing\ResourceRegistrar'))
327
+ {
328
+ $registrar = $this->container->make('Illuminate\Routing\ResourceRegistrar');
329
+ }
330
+ else
331
332
+ $registrar = new ResourceRegistrar($this);
333
334
+
335
+ $registrar->register($name, $controller, $options);
336
}
337
338
/**
0 commit comments