@@ -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,13 +2,13 @@ |
||
| 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 | 8 | use Spatie\QueryBuilder\Exceptions\InvalidAppendQuery; |
| 10 | 9 | use Spatie\QueryBuilder\Exceptions\InvalidFilterQuery; |
| 11 | 10 | use Spatie\QueryBuilder\Exceptions\InvalidIncludeQuery; |
| 11 | +use Spatie\QueryBuilder\Exceptions\InvalidSortQuery; |
|
| 12 | 12 | |
| 13 | 13 | class QueryBuilder extends Builder |
| 14 | 14 | { |