diff --git a/app/Http/Controllers/Api/AssetModelsController.php b/app/Http/Controllers/Api/AssetModelsController.php index b788bc167f..5e9b3ad78d 100644 --- a/app/Http/Controllers/Api/AssetModelsController.php +++ b/app/Http/Controllers/Api/AssetModelsController.php @@ -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')); } diff --git a/resources/views/categories/view.blade.php b/resources/views/categories/view.blade.php index 2cf0960c9b..da37e49914 100644 --- a/resources/views/categories/view.blade.php +++ b/resources/views/categories/view.blade.php @@ -10,6 +10,10 @@ @stop @section('header_right') + + + {{ trans('general.back') }} +