where('slug', $slug) ->first(); if (! $plan) { throw new \InvalidArgumentException("Plan not found: {$slug}"); } $plan->archive($reason); return $plan->fresh(); } }