mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
filters added
This commit is contained in:
@@ -11,6 +11,7 @@ use Rappasoft\LaravelLivewireTables\Views\Columns\ImageColumn;
|
||||
|
||||
class LecturerTable extends DataTableComponent
|
||||
{
|
||||
public string $country;
|
||||
protected $model = Lecturer::class;
|
||||
|
||||
public function configure(): void
|
||||
@@ -66,4 +67,19 @@ class LecturerTable extends DataTableComponent
|
||||
'courses',
|
||||
]);
|
||||
}
|
||||
|
||||
public function lecturerSearch($id)
|
||||
{
|
||||
$lecturer = Lecturer::query()->find($id);
|
||||
|
||||
return to_route('search.event', [
|
||||
'#table',
|
||||
'country' => $this->country,
|
||||
'table' => [
|
||||
'filters' => [
|
||||
'dozent' => $lecturer->id,
|
||||
],
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user