From ffe6cc877f37829eb51ba5ef7c48e887942db177 Mon Sep 17 00:00:00 2001 From: Benjamin Takats Date: Thu, 15 Dec 2022 19:58:51 +0100 Subject: [PATCH] map for events --- app/Http/Livewire/BitcoinEvent/BitcoinEventTable.php | 2 +- app/Http/Livewire/Tables/BitcoinEventTable.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Livewire/BitcoinEvent/BitcoinEventTable.php b/app/Http/Livewire/BitcoinEvent/BitcoinEventTable.php index 19980813..3c3d643d 100644 --- a/app/Http/Livewire/BitcoinEvent/BitcoinEventTable.php +++ b/app/Http/Livewire/BitcoinEvent/BitcoinEventTable.php @@ -30,7 +30,7 @@ class BitcoinEventTable extends Component ]) ->where(fn($query) => $query ->whereHas('venue.city.country', - fn($query) => $query->where('code', $this->country->code)) + fn($query) => $query->where('countries.code', $this->country->code)) ->orWhere('show_worldwide', true) ) ->get() diff --git a/app/Http/Livewire/Tables/BitcoinEventTable.php b/app/Http/Livewire/Tables/BitcoinEventTable.php index 0199fe13..8e4e2163 100644 --- a/app/Http/Livewire/Tables/BitcoinEventTable.php +++ b/app/Http/Livewire/Tables/BitcoinEventTable.php @@ -77,6 +77,7 @@ class BitcoinEventTable extends DataTableComponent ->where(fn($query) => $query ->whereHas('venue.city.country', fn($query) => $query->where('code', $this->country)) - ->orWhere('show_worldwide', true)); + ->orWhere('show_worldwide', true) + ); } }