public function resource($route, $controller, $filter = null)
    {
        $this->register('get', $route, [$controller, 'index'], $filter);
        $this->register('get', $route . '/{id}', [$controller, 'show'], $filter);
        $this->register('post', $route, [$controller, 'store'], $filter);
        $this->register('put', $route . '/{id}', [$controller, 'update'], $filter);
        $this->register('delete', $route . '/{id}', [$controller, 'destroy'], $filter);
        return true;
    }
public function resource($route, $controller, $filter = null)
    {
        $this->register('get', $route, [$controller, 'index'], $filter);
        $this->register('get', $route . '/{id}', [$controller, 'show'], $filter);
        $this->register('post', $route, [$controller, 'store'], $filter);
        $this->register('put', $route . '/{id}', [$controller, 'update'], $filter);
        $this->register('delete', $route . '/{id}', [$controller, 'destroy'], $filter);
        return true;
    }
public function resource ( $ route , $ controller , $ filter = null ) { $ this -> register ( 'get' , $ route , [ $ controller , 'index' ] , $ filter ) ; $ this -> register ( 'get' , $ route . '/{id}' , [ $ controller , 'show' ] , $ filter ) ; $ this -> register ( 'post' , $ route , [ $ controller , 'store' ] , $ filter ) ; $ this -> register ( 'put' , $ route . '/{id}' , [ $ controller , 'update' ] , $ filter ) ; $ this -> register ( 'delete' , $ route . '/{id}' , [ $ controller , 'destroy' ] , $ filter ) ; return true ; }
Register a resource

@param string $route Route for the resource
@param string $controller Controller name
@param string $filter Optional filter to execute
@return boolean Success or fail of registration
Register a resource