@@ -110,6 +110,9 @@ |
||
| 110 | 110 | return $this; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | + /** |
|
| 114 | + * @param string $sorts |
|
| 115 | + */ |
|
| 113 | 116 | public function allowedSorts($sorts) : self |
| 114 | 117 | { |
| 115 | 118 | $sorts = is_array($sorts) ? $sorts : func_get_args(); |
@@ -2,14 +2,14 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Spatie\QueryBuilder; |
| 4 | 4 | |
| 5 | +use Illuminate\Database\Eloquent\Builder; |
|
| 5 | 6 | use Illuminate\Http\Request; |
| 6 | 7 | use Illuminate\Support\Collection; |
| 7 | -use Illuminate\Database\Eloquent\Builder; |
|
| 8 | -use Spatie\QueryBuilder\Exceptions\InvalidSortQuery; |
|
| 9 | -use Spatie\QueryBuilder\Exceptions\InvalidFieldQuery; |
|
| 10 | 8 | use Spatie\QueryBuilder\Exceptions\InvalidAppendQuery; |
| 9 | +use Spatie\QueryBuilder\Exceptions\InvalidFieldQuery; |
|
| 11 | 10 | use Spatie\QueryBuilder\Exceptions\InvalidFilterQuery; |
| 12 | 11 | use Spatie\QueryBuilder\Exceptions\InvalidIncludeQuery; |
| 12 | +use Spatie\QueryBuilder\Exceptions\InvalidSortQuery; |
|
| 13 | 13 | |
| 14 | 14 | class QueryBuilder extends Builder |
| 15 | 15 | { |