mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
This commit implements feature flags using the "ylsideas/feature-flags" library and updates various frontend views to show or hide sections based on the feature flag. Additionally, a new migration file is created for the features database table and the LibraryItem model is updated with a new searchLibraryItems function. The composer.json and composer.lock files are updated to include the new dependencies.
44 lines
1.0 KiB
PHP
44 lines
1.0 KiB
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 string $search = '';
|
|
|
|
public function mount()
|
|
{
|
|
$this->bindles = LibraryItem::searchLibraryItems('bindle');
|
|
}
|
|
|
|
public function updatedSearch($value)
|
|
{
|
|
$this->bindles = LibraryItem::searchLibraryItems('bindle', $value);
|
|
}
|
|
|
|
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'),
|
|
),
|
|
]);
|
|
}
|
|
}
|