mirror of
https://github.com/BillyOutlast/UNIT3D.git
synced 2026-02-04 03:01:20 +01:00
update: consistent use of meta id parameters
This commit is contained in:
@@ -37,9 +37,9 @@ class RequestController extends Controller
|
||||
|
||||
return $query->where('name', 'LIKE', '%'.$searchTerm.'%');
|
||||
})
|
||||
->when($request->filled('categories'), fn ($query) => $query->whereIntegerInRaw('category_id', (array) $request->input('categories')))
|
||||
->when($request->filled('types'), fn ($query) => $query->whereIntegerInRaw('type_id', (array) $request->input('types')))
|
||||
->when($request->filled('resolutions'), fn ($query) => $query->whereIntegerInRaw('resolution_id', (array) $request->input('resolutions')))
|
||||
->when($request->filled('category_id'), fn ($query) => $query->whereIntegerInRaw('category_id', (array) $request->input('category_id')))
|
||||
->when($request->filled('type_id'), fn ($query) => $query->whereIntegerInRaw('type_id', (array) $request->input('type_id')))
|
||||
->when($request->filled('resolution_id'), fn ($query) => $query->whereIntegerInRaw('resolution_id', (array) $request->input('resolution_id')))
|
||||
->when($request->filled('tmdb'), function ($query) use ($request) {
|
||||
$tmdb = $request->integer('tmdb');
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ Filter, sort, and paginate torrent requests.
|
||||
| Parameter | Type | Description | Default |
|
||||
|-----------------|---------|---------------------------------------------------------|-------------|
|
||||
| `name` | string | Search by name | - |
|
||||
| `categories` | int[] | Filter by category ID(s) | - |
|
||||
| `types` | int[] | Filter by type ID(s) | - |
|
||||
| `resolutions` | int[] | Filter by resolution ID(s) | - |
|
||||
| `category_id` | int[] | Filter by category ID(s) | - |
|
||||
| `type_id` | int[] | Filter by type ID(s) | - |
|
||||
| `resolution_id` | int[] | Filter by resolution ID(s) | - |
|
||||
| `tmdb` | integer | Filter by TMDB ID | - |
|
||||
| `imdb` | string | Filter by IMDB ID | - |
|
||||
| `tvdb` | integer | Filter by TVDB ID | - |
|
||||
|
||||
Reference in New Issue
Block a user