$form
->schema([
Forms\Components\TextInput::make('name')
->columnSpan(3),
Forms\Components\Repeater::make('days')
->relationship()
->label('Days')
->orderColumn('day')
->schema([
Forms\Components\Repeater::make('nutrients')
->label('Nutrients')
->relationship()
->schema([
Forms\Components\TextInput::make('parts'),
Forms\Components\Select::make('nutrient_id')
->options($nutrients->pluck('name', 'id'))
]),
Forms\Components\Repeater::make('oncePerDayNutrients')
->relationship()
->schema([
Forms\Components\TextInput::make('ml'),
Forms\Components\Select::make('nutrient_id')
->label('Nutrient')
->options($nutrients->pluck('name', 'id'))
]),
Forms\Components\Repeater::make('lights')
->relationship()
->schema([
Forms\Components\Select::make('light_id')
->label('Light')
->options($lights->pluck('name', 'id'))
])
])
]);
$form
->schema([
Forms\Components\TextInput::make('name')
->columnSpan(3),
Forms\Components\Repeater::make('days')
->relationship()
->label('Days')
->orderColumn('day')
->schema([
Forms\Components\Repeater::make('nutrients')
->label('Nutrients')
->relationship()
->schema([
Forms\Components\TextInput::make('parts'),
Forms\Components\Select::make('nutrient_id')
->options($nutrients->pluck('name', 'id'))
]),
Forms\Components\Repeater::make('oncePerDayNutrients')
->relationship()
->schema([
Forms\Components\TextInput::make('ml'),
Forms\Components\Select::make('nutrient_id')
->label('Nutrient')
->options($nutrients->pluck('name', 'id'))
]),
Forms\Components\Repeater::make('lights')
->relationship()
->schema([
Forms\Components\Select::make('light_id')
->label('Light')
->options($lights->pluck('name', 'id'))
])
])
]);