src/Collection/Mutable.php
public function group(string $id, Closure $callback): self
    {
        $group = new Group($id);

        $callback($group);

        $this->push($group);

        return $this;
    }
public function group(string $id, Closure $callback): self
    {
        $group = new Group($id);

        $callback($group);

        $this->push($group);

        return $this;
    }
public function group ( string $ id , Closure $ callback ) : self { $ group = new Group ( $ id ) ; $ callback ( $ group ) ; $ this -> push ( $ group ) ; return $ this ; }
Add a new elements group.

@param string $id
@param Closure $callback

@return $this
Add a new elements group .