src/Repositories/Order.php
public function apply($model, Repository $repository)
    {
        foreach ($this->order as $order => $by) {
            $model = $model->orderBy($order, $by);
        }

        return $model;
    }
public function apply($model, Repository $repository)
    {
        foreach ($this->order as $order => $by) {
            $model = $model->orderBy($order, $by);
        }

        return $model;
    }
@param  Model|Builder $model
@param Repository     $repository

@return mixed