src/QuerySorters.php
public function apply(Builder $builder)
    {
        $this->builder = $builder;

        if (method_exists($this, $this->orderBy())) {
            call_user_func([$this, $this->orderBy()]);
        }

        return $this->builder;
    }
public function apply(Builder $builder)
    {
        $this->builder = $builder;

        if (method_exists($this, $this->orderBy())) {
            call_user_func([$this, $this->orderBy()]);
        }

        return $this->builder;
    }
public function apply ( Builder $ builder ) { $ this -> builder = $ builder ; if ( method_exists ( $ this , $ this -> orderBy ( ) ) ) { call_user_func ( [ $ this , $ this -> orderBy ( ) ] ) ; } return $ this -> builder ; }
Apply the sorter to the builder.

@param Builder $builder The builder instance.

@return Builder
Apply the sorter to the builder .