public function submitStep(Request $request) { if ($request->has('wizard-action-next')) { return $this->nextStep($request); } if ($request->has('wizard-action-back')) { return $this->previousStep($request); } throw new \RuntimeException('Unknown wizard action'); }