- Fully transitioned the backend to the Porto architectural pattern - Improved code organization and maintainability - Fixed minor bugs and inconsistencies
22 lines
635 B
PHP
22 lines
635 B
PHP
<?php
|
|
|
|
namespace App\Filament\Components\Forms\ItemForm\Blocks;
|
|
|
|
use App\Containers\Widget\Models\Slider;
|
|
use Filament\Forms\Components\Select;
|
|
|
|
class SliderBlock implements BlockSchema
|
|
{
|
|
|
|
public static function schema(): array
|
|
{
|
|
return [
|
|
Select::make('slider')
|
|
->label('Слайдер')
|
|
->options(Slider::query()->whereHas('slides')->where('is_active', true)->pluck('title', 'slug'))
|
|
->searchable()
|
|
->required()
|
|
->helperText('Выберите активный слайдер с изображениями'),
|
|
];
|
|
}
|
|
} |