create fms service api

This commit is contained in:
2024-12-28 15:22:32 +03:30
parent 42c3dc4ce8
commit 51161854bd
4 changed files with 44 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ class CMMSMachinesController extends Controller
public function list(): JsonResponse
{
$machinesList = CMMSMachine::query()->get(['machine_code', 'id']);
$machinesList = CMMSMachine::query()->get(['machine_code', 'id', 'plak_number', 'car_name']);
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', 'id']);
->get(['machine_code', 'id', 'plak_number', 'car_name']);
return $this->successResponse($matchedSearchedMachines);
}