events renamed to course events

This commit is contained in:
Benjamin Takats
2022-12-14 11:23:35 +01:00
parent 7dede68675
commit 7f8117ff5c
17 changed files with 99 additions and 89 deletions

View File

@@ -67,7 +67,7 @@ class CourseTable extends DataTableComponent
),
Column::make("Termine")
->label(
fn($row, Column $column) => '<strong>'.$row->events_count.'</strong>'
fn($row, Column $column) => '<strong>'.$row->course_events_count.'</strong>'
)
->html()
->sortable()
@@ -86,9 +86,9 @@ class CourseTable extends DataTableComponent
{
return Course::query()
->withCount([
'events',
'courseEvents',
])
->whereHas('events.venue.city.country',
->whereHas('courseEvents.venue.city.country',
fn($query) => $query->where('countries.code', $this->country));
}