src/Routing/Router.php
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);
    }
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);
    }
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 ) ; }
Register a resource controller.

@param string $name
@param string $controller
@param array  $options

@return void
Register a resource controller .