Correctly filter by category_id

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2022-06-13 20:42:21 -07:00
parent aec033d8d2
commit dd9c9520fb
2 changed files with 7 additions and 1 deletions
@@ -70,6 +70,10 @@ class AssetModelsController extends Controller
$assetmodels->onlyTrashed();
}
if ($request->filled('category_id')) {
$assetmodels = $assetmodels->where('models.category_id', '=', $request->input('category_id'));
}
if ($request->filled('search')) {
$assetmodels->TextSearch($request->input('search'));
}