diff --git a/app/Http/Controllers/Admin/ResolutionbasisCrudController.php b/app/Http/Controllers/Admin/ResolutionbasisCrudController.php index 224a0b34..ba3f0031 100644 --- a/app/Http/Controllers/Admin/ResolutionbasisCrudController.php +++ b/app/Http/Controllers/Admin/ResolutionbasisCrudController.php @@ -46,7 +46,12 @@ protected function setupListOperation() 'label' => trans('app.contract.title'), 'entity' => 'contract', 'attribute' => 'InputNumber', - 'model' => 'App\Models\Contract' + 'model' => 'App\Models\Contract', + 'searchLogic' => function ($query, $column, $searchTerm) { + $query->whereHas('contract', function ($q) use ($column, $searchTerm) { + $q->where('InputNumber', 'like', '%'.$searchTerm.'%'); + }); + } ], [ 'name' => 'department_id', @@ -54,7 +59,8 @@ protected function setupListOperation() 'label' => trans('app.resolution.department'), 'entity' => 'department', 'attribute' => 'title', - 'model' => 'App\Models\Department' + 'model' => 'App\Models\Department', + 'searchLogic' => false ], [ 'name' => 'resolution_id', @@ -62,12 +68,14 @@ protected function setupListOperation() 'label' => trans('app.resolution.resolution'), 'entity' => 'resolution', 'attribute' => 'title', - 'model' => 'App\Models\Resolution' + 'model' => 'App\Models\Resolution', + 'searchLogic' => false ], [ 'name' => 'resolutionbasis', 'type' => 'text', - 'label' => trans('app.resolution.resolutionbasis') + 'label' => trans('app.resolution.resolutionbasis'), + 'searchLogic' => false ] ]);