change relation

This commit is contained in:
2025-12-28 12:35:49 +03:30
parent ef0ddac761
commit f7e044f65a
4 changed files with 4 additions and 4 deletions

View File

@@ -226,6 +226,6 @@ class RoadMaintenanceStationController extends Controller
public function giveListToFms(): JsonResponse public function giveListToFms(): JsonResponse
{ {
return $this->successResponse(RahdariPoint::all(['id', 'name', 'lat', 'lng', 'area'])); return $this->successResponse(RahdariPoint::all(['id', 'province_id', 'province_name', 'city_id', 'city_name', 'name', 'lat', 'lng', 'area']));
} }
} }

View File

@@ -17,8 +17,8 @@ class MissionViolation extends Model
return $this->belongsTo(Mission::class); return $this->belongsTo(Mission::class);
} }
public function machine(): HasOne public function machine(): BelongsTo
{ {
return $this->hasOne(CMMSMachine::class); return $this->belongsTo(CMMSMachine::class, 'machine_id');
} }
} }

View File

@@ -46,6 +46,7 @@ class DailyMovingMachinesService
$inputData = $this->makeInputParameters(); $inputData = $this->makeInputParameters();
return Http::withBody($inputData) return Http::withBody($inputData)
->timeout(120)
->throw() ->throw()
->withoutVerifying() ->withoutVerifying()
->post($this->url) ->post($this->url)

View File

@@ -30,7 +30,6 @@ class DailyMoveMachineService
$request, $request,
allowedFilters: ['*'], allowedFilters: ['*'],
allowedSortings: ['*'], allowedSortings: ['*'],
allowedSelects: ['id', 'mission_id', 'machine_code', 'request_date', 'type', 'exit_time', 'enter_time', 'status']
); );
} }
} }