sort by coursesEvents

This commit is contained in:
Benjamin Takats
2023-01-15 15:02:15 +01:00
parent bceae06176
commit 002879b375
3 changed files with 32 additions and 25 deletions

View File

@@ -164,10 +164,11 @@ class EventTable extends DataTableComponent
{
return CourseEvent::query()
->withCount([
'registrations',
])
'registrations',
])
->where('from', '>=', now())
->whereHas('venue.city.country',
fn($query) => $query->where('countries.code', $this->country));
fn($query) => $query->where('countries.code', $this->country));
}
public function viewHistoryModal($modelId): void