public function sort(Closure $closure)
    {
        $sorted = clone $this;

        $sorted->models = Objects::sort($sorted->models, $closure);

        return $sorted;
    }
public function sort(Closure $closure)
    {
        $sorted = clone $this;

        $sorted->models = Objects::sort($sorted->models, $closure);

        return $sorted;
    }
public function sort ( Closure $ closure ) { $ sorted = clone $ this ; $ sorted -> models = Objects :: sort ( $ sorted -> models , $ closure ) ; return $ sorted ; }
Sort the models collection using a comparation closure

@param  Closure $closure
@return array
Sort the models collection using a comparation closure