Merge pull request #16356 from snipe/added_fields_for_model_search

Added name, model_number and notes for strict search
This commit is contained in:
snipe 2025-02-26 12:46:13 +00:00 committed by GitHub
commit 31516d7f24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -77,6 +77,18 @@ class AssetModelsController extends Controller
$assetmodels->onlyTrashed();
}
if ($request->filled('name')) {
$assetmodels = $assetmodels->where('models.name', '=', $request->input('name'));
}
if ($request->filled('model_number')) {
$assetmodels = $assetmodels->where('models.model_number', '=', $request->input('model_number'));
}
if ($request->filled('notes')) {
$assetmodels = $assetmodels->where('models.notes', '=', $request->input('notes'));
}
if ($request->filled('category_id')) {
$assetmodels = $assetmodels->where('models.category_id', '=', $request->input('category_id'));
}