greater than now

This commit is contained in:
Benjamin Takats
2022-12-19 11:38:11 +01:00
parent fafedad9d2
commit af91aa5498
2 changed files with 4 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ class BitcoinEventTable extends Component
->with([ ->with([
'venue.city.country', 'venue.city.country',
]) ])
->where('bitcoin_events.from', '>=', now())
->where(fn($query) => $query ->where(fn($query) => $query
->whereHas('venue.city.country', ->whereHas('venue.city.country',
fn($query) => $query->where('countries.code', $this->country->code)) fn($query) => $query->where('countries.code', $this->country->code))
@@ -40,6 +41,7 @@ class BitcoinEventTable extends Component
'coords' => [$event->venue->city->latitude, $event->venue->city->longitude], 'coords' => [$event->venue->city->latitude, $event->venue->city->longitude],
]), ]),
'events' => BitcoinEvent::query() 'events' => BitcoinEvent::query()
->where('bitcoin_events.from', '>=', now())
->get() ->get()
->map(fn($event) => [ ->map(fn($event) => [
'id' => $event->id, 'id' => $event->id,

View File

@@ -31,6 +31,7 @@ class MeetupEventTable extends Component
->with([ ->with([
'meetup.city.country', 'meetup.city.country',
]) ])
->where('meetup_events.start', '>=', now())
->whereHas('meetup.city.country', ->whereHas('meetup.city.country',
fn($query) => $query->where('countries.code', $this->country->code)) fn($query) => $query->where('countries.code', $this->country->code))
->get() ->get()
@@ -43,6 +44,7 @@ class MeetupEventTable extends Component
->with([ ->with([
'meetup.city.country', 'meetup.city.country',
]) ])
->where('meetup_events.start', '>=', now())
->whereHas('meetup.city.country', ->whereHas('meetup.city.country',
fn($query) => $query->where('countries.code', $this->country->code)) fn($query) => $query->where('countries.code', $this->country->code))
->get() ->get()