79500089

Date: 2025-03-11 08:52:38
Score: 0.5
Natty:
Report link

I simplified all queries and went from fetching a few fields to all. Now it seems to work. Really weird.

 public function render()
    {
        if (!$this->email) {
            abort(404);
        }

        $this->klant = VasteKlanten::where('email', $this->email)->first();

        if (!$this->klant) {
            $this->klant = Reserveringen::where('email', $this->email)
                ->orderBy('id', 'desc')
                ->first();

            $this->vaste_klant = false;
        }

        if ($this->klant) {
            $this->reserveringen = Reserveringen::where('email', $this->email)->get();
            $this->invitatie = NieuweKlanten::where('email', $this->klant->email)->get();
        }

        return view('livewire.beheer.klant-details');
    }
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Matilda Smets