add new column for filtering
This commit is contained in:
@@ -14,7 +14,7 @@ class CMMSMachinesController extends Controller
|
||||
|
||||
public function list(): JsonResponse
|
||||
{
|
||||
$machinesList = CMMSMachine::query()->get(['machine_code']);
|
||||
$machinesList = CMMSMachine::query()->get(['machine_code', 'id']);
|
||||
|
||||
return $this->successResponse($machinesList);
|
||||
}
|
||||
@@ -23,7 +23,7 @@ class CMMSMachinesController extends Controller
|
||||
{
|
||||
$matchedSearchedMachines = CMMSMachine::query()
|
||||
->where('machine_code', 'LIKE', "%{$request->machine_code}%")
|
||||
->get(['machine_code']);
|
||||
->get(['machine_code', 'id']);
|
||||
|
||||
return $this->successResponse($matchedSearchedMachines);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user