systemParamService = $systemParamService; } public function index() { $response = $this->systemParamService->getAllParameters(); if (!$response['success']) { return back()->with('error', $response['message']); } return view('pages.system-parameters', [ 'parameters' => $response['data'] ]); } public function store(Request $request) { $response = $this->systemParamService->createParameter($request->all()); if (!$response['success']) { return back()->withInput()->with('error', $response['message']); } return redirect()->route('system-parameters.index') ->with('success', 'Parameter created successfully'); } public function update(Request $request, $id) { $response = $this->systemParamService->updateParameter($id, $request->all()); if (!$response['success']) { return back()->withInput()->with('error', $response['message']); } return redirect()->route('system-parameters.index') ->with('success', 'Parameter updated successfully'); } public function destroy($id) { $response = $this->systemParamService->deleteParameter($id); if (!$response['success']) { return back()->with('error', $response['message']); } return redirect()->route('system-parameters.index') ->with('success', 'Parameter deleted successfully'); } }