protected function getAlternativeResourceAction(Resolver $resolver)
    {
        $parameters = $resolver->getParameters();
        $segments   = $resolver->getSegments();

        $last       = array_pop($parameters);
        $resources  = array_keys($segments);

        if (in_array($last, ['edit', 'create', 'delete'])) {
            // Handle all possible GET routing.
            return $last;
        } elseif (! in_array($last, $resources) && ! empty($segments)) {
            return 'show';
        }

        return 'index';
    }