fix operator controller for road patrol
This commit is contained in:
@@ -12,8 +12,8 @@ class OperatorService
|
|||||||
public function dataTable(Request $request, $loadRelations = false)
|
public function dataTable(Request $request, $loadRelations = false)
|
||||||
{
|
{
|
||||||
$query = RoadPatrol::query()
|
$query = RoadPatrol::query()
|
||||||
->where('operator_id', '=', auth()->user()->id)
|
->where('operator_id', '=', auth()->user()->id);
|
||||||
->when($loadRelations, fn ($query) => $query->with(['rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']));
|
// ->when($loadRelations, fn ($query) => $query->with(['rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']));
|
||||||
|
|
||||||
return DataTableFacade::run(
|
return DataTableFacade::run(
|
||||||
$query,
|
$query,
|
||||||
|
|||||||
Reference in New Issue
Block a user