protected function extractFromEndpoints(EndpointCollection $endpoints, $key)
    {
        $items = [
            'index' => [], 'create' => [], 'store' => [], 'show' => [],
            'edit'  => [], 'update' => [], 'destroy' => [],
        ];

        foreach ($this->getEndpointsWithResourceMethods($endpoints, $key) as $endpoint) {
            $items[$endpoint->method] = array_merge($items[$endpoint->method], $endpoint->{$key});
        }

        return $items;
    }