Files
einundzwanzig-portal/app/Http/Livewire/Bindle/Gallery.php
HolgerHatGarKeineNode a77e178ba8 update bindle form
2023-08-03 18:53:22 +02:00

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'),
),
]);
}
}