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;
    }