updatesVoucherEndDate = $updatesVoucherEndDate; $this->canUpdateVoucherEndDate = $canUpdateVoucherEndDate; } protected function notification(): array { return [ 'title' => 'Updated Voucher End Date', 'message' => 'The selected voucher end date has been updated.' ]; } public function logic(Request $request): JsonResponse { $object = new UpdateVoucherEndDateObject( $request->input('id'), $request->input('end_date') ); $this->canUpdateVoucherEndDate->passes($object); $voucher = $this->updatesVoucherEndDate->execute($object); return $this->response([]); } }