diff --git a/src/OnboardingSteps.php b/src/OnboardingSteps.php index 18f8069..09369c0 100644 --- a/src/OnboardingSteps.php +++ b/src/OnboardingSteps.php @@ -15,12 +15,10 @@ public function addStep(string $title, string $model = null): OnboardingStep $step = new OnboardingStep($title); if ($model && new $model() instanceof Onboardable) { - $this->steps[$model][] = $step; - } else { - $this->steps['default'][] = $step; + return $this->steps[$model][] = $step; } - return $step; + return $this->steps['default'][] = $step; } public function steps(Onboardable $model): Collection