mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
podcasts added
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Livewire\Frontend;
|
||||
|
||||
use App\Models\Country;
|
||||
use App\Models\Podcast;
|
||||
use Livewire\Component;
|
||||
|
||||
class Library extends Component
|
||||
@@ -24,13 +25,22 @@ class Library extends Component
|
||||
abort(403);
|
||||
}
|
||||
|
||||
$libraries = \App\Models\Library::query()
|
||||
->where('is_public', $shouldBePublic)
|
||||
->get();
|
||||
$tabs = collect([
|
||||
[
|
||||
'name' => 'Alle',
|
||||
]
|
||||
]);
|
||||
foreach ($libraries as $library) {
|
||||
$tabs->push([
|
||||
'name' => $library->name,
|
||||
]);
|
||||
}
|
||||
|
||||
return view('livewire.frontend.library', [
|
||||
'libraries' => \App\Models\Library::query()
|
||||
->where('is_public', $shouldBePublic)
|
||||
->get()
|
||||
->prepend(\App\Models\Library::make([
|
||||
'name' => 'Alle',
|
||||
])),
|
||||
'libraries' => $tabs,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ class LibraryItemTable extends DataTableComponent
|
||||
'alt' => $row->name.' Avatar',
|
||||
])
|
||||
->collapseOnMobile(),
|
||||
Column::make('Dozent', "lecturer.name")
|
||||
Column::make('Ersteller', "lecturer.name")
|
||||
->label(
|
||||
fn($row, Column $column) => view('columns.courses.lecturer')->withRow($row)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user