mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
bindle api
This commit is contained in:
@@ -36,8 +36,16 @@ Route::middleware([])
|
|||||||
Route::get('bindles', function () {
|
Route::get('bindles', function () {
|
||||||
return \App\Models\LibraryItem::query()
|
return \App\Models\LibraryItem::query()
|
||||||
->where('type', 'bindle')
|
->where('type', 'bindle')
|
||||||
|
->with([
|
||||||
|
'media',
|
||||||
|
])
|
||||||
->orderByDesc('id')
|
->orderByDesc('id')
|
||||||
->get();
|
->get()->map(fn($item) => [
|
||||||
|
'id' => $item->id,
|
||||||
|
'name' => $item->name,
|
||||||
|
'link' => $item->value,
|
||||||
|
'image' => $item->getFirstMediaUrl('main'),
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
Route::get('meetups', function () {
|
Route::get('meetups', function () {
|
||||||
return \App\Models\Meetup::query()
|
return \App\Models\Meetup::query()
|
||||||
|
|||||||
Reference in New Issue
Block a user