mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
41 lines
964 B
PHP
41 lines
964 B
PHP
<?php
|
|
|
|
namespace App\Http\Livewire\Bindle;
|
|
|
|
use App\Models\LibraryItem;
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
use Livewire\Component;
|
|
use RalphJSmit\Laravel\SEO\Support\SEOData;
|
|
|
|
class Gallery extends Component
|
|
{
|
|
public Collection $bindles;
|
|
|
|
public function mount()
|
|
{
|
|
$this->bindles = LibraryItem::query()
|
|
->where('type', 'bindle')
|
|
->latest('id')
|
|
->get();
|
|
}
|
|
|
|
public function deleteBindle($id)
|
|
{
|
|
LibraryItem::query()->find($id)?->delete();
|
|
|
|
return to_route('bindles');
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.bindle.gallery')
|
|
->layout('layouts.app', [
|
|
'SEOData' => new SEOData(
|
|
title: __('Bindle Gallery'),
|
|
description: __('Die berühmte Bindlesammlung von FiatTracker.'),
|
|
image: asset('img/fiat_tracker.jpg'),
|
|
),
|
|
]);
|
|
}
|
|
}
|