mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
Apply Laravel coding style
Shift automatically applies the Laravel coding style - which uses the PSR-12 coding style as a base with some minor additions. You may customize the code style applied by configuring [Pint](https://laravel.com/docs/pint), [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer), or [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for your project root. For more information on customizing the code style applied by Shift, [watch this short video](https://laravelshift.com/videos/shift-code-style).
This commit is contained in:
committed by
HolgerHatGarKeineNode
parent
a15ca4a2bc
commit
5776b01d15
@@ -20,13 +20,13 @@ class VenueTable extends DataTableComponent
|
||||
->setAdditionalSelects(['id'])
|
||||
->setThAttributes(function (Column $column) {
|
||||
return [
|
||||
'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400',
|
||||
'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400',
|
||||
'default' => false,
|
||||
];
|
||||
})
|
||||
->setTdAttributes(function (Column $column, $row, $columnIndex, $rowIndex) {
|
||||
return [
|
||||
'class' => 'px-6 py-4 text-sm font-medium dark:text-white',
|
||||
'class' => 'px-6 py-4 text-sm font-medium dark:text-white',
|
||||
'default' => false,
|
||||
];
|
||||
})
|
||||
@@ -39,27 +39,27 @@ class VenueTable extends DataTableComponent
|
||||
return [
|
||||
ImageColumn::make('Bild')
|
||||
->location(
|
||||
fn($row) => $row->getFirstMediaUrl('images', 'thumb')
|
||||
fn ($row) => $row->getFirstMediaUrl('images', 'thumb')
|
||||
)
|
||||
->attributes(fn($row) => [
|
||||
->attributes(fn ($row) => [
|
||||
'class' => 'rounded h-16 w-16',
|
||||
'alt' => $row->name.' Avatar',
|
||||
'alt' => $row->name.' Avatar',
|
||||
])
|
||||
->collapseOnMobile(),
|
||||
Column::make("Name", "name")
|
||||
->searchable(fn($query, $term) => $query->where('name', 'ilike', '%'.$term.'%'))
|
||||
Column::make('Name', 'name')
|
||||
->searchable(fn ($query, $term) => $query->where('name', 'ilike', '%'.$term.'%'))
|
||||
->sortable(),
|
||||
Column::make("Street", "street")
|
||||
Column::make('Street', 'street')
|
||||
->sortable()
|
||||
->collapseOnMobile(),
|
||||
Column::make('Termine')
|
||||
->label(
|
||||
fn($row, Column $column) => $row->course_events_count
|
||||
fn ($row, Column $column) => $row->course_events_count
|
||||
)
|
||||
->collapseOnMobile(),
|
||||
Column::make('')
|
||||
->label(
|
||||
fn($row, Column $column) => view('columns.venues.action')->withRow($row)
|
||||
fn ($row, Column $column) => view('columns.venues.action')->withRow($row)
|
||||
),
|
||||
];
|
||||
}
|
||||
@@ -70,7 +70,7 @@ class VenueTable extends DataTableComponent
|
||||
->withCount([
|
||||
'courseEvents',
|
||||
])
|
||||
->whereHas('city.country', fn($query) => $query->where('code', $this->country))
|
||||
->whereHas('city.country', fn ($query) => $query->where('code', $this->country))
|
||||
->orderByDesc('course_events_count')
|
||||
->orderBy('venues.id');
|
||||
}
|
||||
@@ -82,12 +82,12 @@ class VenueTable extends DataTableComponent
|
||||
|
||||
return to_route('school.table.event', [
|
||||
'#table',
|
||||
'country' => $this->country,
|
||||
'country' => $this->country,
|
||||
'course_events' => [
|
||||
'filters' => [
|
||||
'venue' => $venue->name,
|
||||
],
|
||||
]
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user