protected function getSteps(): array
{
return [
Step::make('General')
->description('Configure general informations')
->schema([
Select::make('template_id')
->required()
->relationship('template', 'name')
->live()
->afterStateUpdated(fn (Select $component) => $component
->getContainer()
->getComponent('dynamicService')
->getChildComponentContainer()
->fill()
),
]),
Step::make('Service')
->description('Configure service informations')
->schema(fn (Get $get): array => $get('template_id') ? \Aura::getServiceByKey(Template::find($get('template_id')))::getTemplateForm() : [])
->key('dynamicService')
];
}
protected function getSteps(): array
{
return [
Step::make('General')
->description('Configure general informations')
->schema([
Select::make('template_id')
->required()
->relationship('template', 'name')
->live()
->afterStateUpdated(fn (Select $component) => $component
->getContainer()
->getComponent('dynamicService')
->getChildComponentContainer()
->fill()
),
]),
Step::make('Service')
->description('Configure service informations')
->schema(fn (Get $get): array => $get('template_id') ? \Aura::getServiceByKey(Template::find($get('template_id')))::getTemplateForm() : [])
->key('dynamicService')
];
}