create new culumn in machine and add in controller and createe enum for this
This commit is contained in:
@@ -22,13 +22,13 @@ class CMMSMachinesController extends Controller
|
||||
$request,
|
||||
allowedFilters: ['*'],
|
||||
allowedSortings: ['*'],
|
||||
allowedSelects: ['machine_code', 'id', 'plak_number', 'car_name', 'car_type']
|
||||
allowedSelects: ['machine_code', 'id', 'plak_number', 'car_name', 'car_type', 'status'],
|
||||
));
|
||||
}
|
||||
|
||||
public function list(): JsonResponse
|
||||
{
|
||||
$machinesList = CMMSMachine::query()->get(['machine_code', 'id', 'plak_number', 'car_name', 'car_type']);
|
||||
$machinesList = CMMSMachine::query()->get(['machine_code', 'id', 'plak_number', 'car_name', 'car_type', 'status']);
|
||||
|
||||
return $this->successResponse($machinesList);
|
||||
}
|
||||
@@ -37,7 +37,7 @@ class CMMSMachinesController extends Controller
|
||||
{
|
||||
$matchedSearchedMachines = CMMSMachine::query()
|
||||
->where('machine_code', 'LIKE', "%{$request->machine_code}%")
|
||||
->get(['machine_code', 'id', 'plak_number', 'car_name']);
|
||||
->get(['machine_code', 'id', 'plak_number', 'car_name', 'status']);
|
||||
|
||||
return $this->successResponse($matchedSearchedMachines);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user