create a rule to verify otp
This commit is contained in:
@@ -161,24 +161,13 @@ class RoadPatrolProjectController extends Controller
|
||||
], 400);
|
||||
}
|
||||
|
||||
$start_coordinates = explode(',', $request->start_point);
|
||||
$end_coordinates = explode(',', $request->end_point);
|
||||
|
||||
$edare_id = $user->edarate_shahri_id ?? $user->edarate_ostani_id;
|
||||
$edare_name = $user->edarate_shahri_id ? $user->edarate_shahri_name : $user->edarate_ostani_name;
|
||||
|
||||
$road_patrol = DB::transaction(function () use ($request, $start_coordinates,
|
||||
$end_coordinates, $edare_id,
|
||||
$road_patrol = DB::transaction(function () use ($request, $edare_id,
|
||||
$edare_name, $nominatimService, $user) {
|
||||
|
||||
$road_patrol = RoadPatrol::query()->create([
|
||||
'start_lat' => $start_coordinates[0],
|
||||
'start_lon' => $start_coordinates[1],
|
||||
'end_lat' => $end_coordinates[0],
|
||||
'end_lon' => $end_coordinates[1],
|
||||
'officer_name' => $request->officer_name,
|
||||
'officer_phone_number' => $request->officer_phone_number,
|
||||
'officer_plaque' => $request->officer_plaque,
|
||||
'operator_id' => $user->id,
|
||||
'operator_name' => $user->name,
|
||||
'province_id' => $user->province_id,
|
||||
@@ -187,8 +176,6 @@ class RoadPatrolProjectController extends Controller
|
||||
'city_fa' => $user->city_fa,
|
||||
'edare_id' => $edare_id,
|
||||
'edare_name' => $edare_name,
|
||||
'start_way_id' => $nominatimService->get_way_id_from_nominatim($start_coordinates[0], $start_coordinates[1]),
|
||||
'end_way_id' => $nominatimService->get_way_id_from_nominatim($end_coordinates[0], $end_coordinates[1]),
|
||||
'status' => 0,
|
||||
'status_fa' => 'در حال بررسی',
|
||||
'distance' => $request->distance,
|
||||
|
||||
Reference in New Issue
Block a user