public function shouldProcess($mode, $actions = [])
    {
        if (is_string($actions)) {
            $actions = [$actions];
        }

        switch ($mode) {
            case 'only':
                return in_array($this->action, $actions);

            case 'not':
                return !in_array($this->action, $actions);

            default:
                throw new \Exception('Invalid mode');
        }
    }