public function withComponent($components, $callback = null)
    {
        return $this->filter(function ($object) use ($components, $callback) {

            $hasComponent = false;

            foreach ((array) $components as $componentName) {

                if (!$callback && $object->hasComponent($componentName)) {
                    $hasComponent = true;
                }

                if ($callback && ($component = $object->getComponent($componentName))) {
                    $hasComponent = call_user_func($callback, $component) ?: $hasComponent;
                }
            }

            return $hasComponent;
        });
    }