add start and finish time
This commit is contained in:
@@ -96,6 +96,8 @@ class ViolationManagementController extends Controller
|
||||
}
|
||||
public function store(StoreRequest $request): JsonResponse
|
||||
{
|
||||
$user = auth()->user();
|
||||
|
||||
MissionViolation::query()->create([
|
||||
'machine_id'=> CMMSMachine::query()->where('machine_code', '=', $request->machine_code)->value('id'),
|
||||
'machine_code'=> $request->machine_code,
|
||||
@@ -104,6 +106,10 @@ class ViolationManagementController extends Controller
|
||||
'request_date' => now(),
|
||||
'km' => $request->km,
|
||||
'gps' => 0,
|
||||
'province_id' => $user->province_id,
|
||||
'province_name' => $user->province_fa,
|
||||
'city_id' => $user->city_id,
|
||||
'city_name' => $user->city_fa,
|
||||
]);
|
||||
|
||||
return $this->successResponse();
|
||||
|
||||
Reference in New Issue
Block a user