This commit is contained in:
HolgerHatGarKeineNode
2023-04-28 11:12:54 +02:00
parent 938ed12b38
commit b76a810da5
2 changed files with 4 additions and 4 deletions

View File

@@ -33,7 +33,7 @@ class LandingPage extends Component
'meetup.city.country', 'meetup.city.country',
]) ])
->where('meetup_events.meetup_id', $this->meetup->id) ->where('meetup_events.meetup_id', $this->meetup->id)
->where('meetup_events.start', '>=', now()) ->where('meetup_events.start', '>=', now()->subDay())
->orderBy('start') ->orderBy('start')
->get(), ->get(),
'events' => MeetupEvent::query() 'events' => MeetupEvent::query()
@@ -41,7 +41,7 @@ class LandingPage extends Component
'meetup.city.country', 'meetup.city.country',
]) ])
->where('meetup_events.meetup_id', $this->meetup->id) ->where('meetup_events.meetup_id', $this->meetup->id)
->where('meetup_events.start', '>=', now()) ->where('meetup_events.start', '>=', now()->subDay())
->orderBy('start') ->orderBy('start')
->get() ->get()
->map(fn ($event) => [ ->map(fn ($event) => [

View File

@@ -34,7 +34,7 @@ class MeetupEventTable extends Component
->with([ ->with([
'meetup.city.country', 'meetup.city.country',
]) ])
->where('meetup_events.start', '>=', now()) ->where('meetup_events.start', '>=', now()->subDay())
->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()
@@ -47,7 +47,7 @@ class MeetupEventTable extends Component
->with([ ->with([
'meetup.city.country', 'meetup.city.country',
]) ])
->where('meetup_events.start', '>=', now()) ->where('meetup_events.start', '>=', now()->subDay())
->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()