mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
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:
commit
31516d7f24
|
@ -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'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue