Caffeinated\Menus\Builder::filter PHP Method

filter() public method

Since menu items are stored as a collection, this will simply forward the callback to the Laravel Collection filter() method and return the results.
public filter ( callable $callback ) : Builder
$callback callable
return Builder
    public function filter($callback)
    {
        if (is_callable($callback)) {
            $this->items = $this->items->filter($callback);
        }
        return $this;
    }