public function applySorts(Builder $query, string $alias = null)
    {
        foreach ($this->getSorts() as $sort) {
            $sort->apply($query, $alias);
        }
    }
public function applySorts(Builder $query, string $alias = null)
    {
        foreach ($this->getSorts() as $sort) {
            $sort->apply($query, $alias);
        }
    }
public function applySorts ( Builder $ query , string $ alias = null ) { foreach ( $ this -> getSorts ( ) as $ sort ) { $ sort -> apply ( $ query , $ alias ) ; } }
Applies sorts Eloquent Query builder

@param Builder     $query Eloquent query builder
@param string|null $alias SQL alias

@return void
Applies sorts Eloquent Query builder