Files
backend-umra/app/Filament/Resources/Programs/Schemas/ProgramForm.php

52 lines
1.9 KiB
PHP

<?php
namespace App\Filament\Resources\Programs\Schemas;
use Filament\Forms\Components\Repeater;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\TimePicker;
use Filament\Schemas\Schema;
class ProgramForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
Select::make('group_id')
->relationship('group', 'name')
->label('Topar')
->required(),
Repeater::make('days')
->label('Günler')
->itemLabel(fn (array $state): ?string => ($state['day_number'] ?? '').'-nji gün')
->schema([
TextInput::make('day_number')
->numeric()
->required()
->label('Günüň belgisi'),
Repeater::make('actions')
->label('Actionlar')
->schema([
TextInput::make('title')
->label('Ady')
->required()
->maxLength(255),
Textarea::make('description')
->label('Düşündirişi')
->columnSpanFull(),
TimePicker::make('time')
->label('Wagty'),
TextInput::make('icon')
->label('Ikony')
->required()
->maxLength(255),
])
->columns(2),
])->columnSpanFull(),
]);
}
}