customers = $customers; $this->contacts = $customers->first()->contacts; } public function getContacts(): void { $this->contacts = Customer::find($this->selectedCustomer)->contacts; } public function render(): View { return view('livewire.create-order', [ 'contacts' => $this->contacts, 'order_types' => OrderType::cases(), 'order_status' => OrderStatus::cases(), 'customers' => $this->customers, 'today' => Carbon::today()->format('Y-m-d'), 'due_default' => Carbon::today()->addDay(10)->format('Y-m-d'), ]); } }