We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5b0d7f4 + e79af25 commit 31516d7Copy full SHA for 31516d7
app/Http/Controllers/Api/AssetModelsController.php
@@ -77,6 +77,18 @@ public function index(Request $request) : JsonResponse | array
77
$assetmodels->onlyTrashed();
78
}
79
80
+ if ($request->filled('name')) {
81
+ $assetmodels = $assetmodels->where('models.name', '=', $request->input('name'));
82
+ }
83
+
84
+ if ($request->filled('model_number')) {
85
+ $assetmodels = $assetmodels->where('models.model_number', '=', $request->input('model_number'));
86
87
88
+ if ($request->filled('notes')) {
89
+ $assetmodels = $assetmodels->where('models.notes', '=', $request->input('notes'));
90
91
92
if ($request->filled('category_id')) {
93
$assetmodels = $assetmodels->where('models.category_id', '=', $request->input('category_id'));
94
0 commit comments