/** * Register a resource controller. * * @param string $name * @param string $controller * @param array $options * * @return void */ public function resource($name, $controller, array $options = []) { if ($this->container->bound('Dingo\\Api\\Routing\\ResourceRegistrar')) { $registrar = $this->container->make('Dingo\\Api\\Routing\\ResourceRegistrar'); } else { $registrar = new ResourceRegistrar($this); } $registrar->register($name, $controller, $options); }
/** * Register a resource controller. * * @param string $name * @param string $controller * @param array $options * * @return void */ public function resource($name, $controller, array $options = []) { if ($this->container->bound(ResourceRegistrar::class)) { $registrar = $this->container->make(ResourceRegistrar::class); } else { $registrar = new ResourceRegistrar($this); } $registrar->register($name, $controller, $options); }