context[$property] = $value; // The following may not be needed, as we can pass arround $context. // cache()->set($this->hash, $this->context); return $this; } #[On('purchase.next')] public function handleNext(): void { if ($this->step < count($this->steps) - 1) { $this->step++; } } #[On('purchase.forward')] public function handleForward(string $component): void { $this->step = array_search($component, $this->steps); } #[Computed()] public function component(): string { return $this->steps[$this->step]; } public function mount() { MultiDB::setDb($this->db); $this ->handleContext('hash', $this->hash) ->handleContext('quantity', 1) ->handleContext('request_data', $this->request_data) ->handleContext('campaign', $this->campaign); } public function render() { return view('billing-portal.v3.purchase'); } }