EscolaLMS/API

View on GitHub
app/Repositories/Criteria/OrderCriterion.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace App\Repositories\Criteria;

use EscolaLms\Core\Repositories\Criteria\Criterion;
use Illuminate\Database\Eloquent\Builder;

class OrderCriterion extends Criterion
{
    public function apply(Builder $query): Builder
    {
        return $query->orderBy($this->key, $this->value);
    }
}