Skip to content

using belongs to selection inside the container #204

@mahmoudsharf-eldin

Description

@mahmoudsharf-eldin

I have a dynamic container which fields come from function depending on the selection from belongs to field,
how could i use this selection inside container and pass it to function ?

BelongsTo::make('Type','type',Type::class),
            NovaDependencyContainer::make([
                Select::make(__('Language'),'language')
                    ->options($languages)
                    ->displayUsingLabels(),
                NovaDependencyContainer::make(
                        **$this->pageFields( 'type_id','language_id')**
                    )->withMeta([
                    'dependencies' => [
                        ['field' => 'language', 'property' => 'language', 'notEmpty' => true],
                    ],
                ]),
            ])->withMeta([
                'dependencies' => [
                    ['field' => 'type', 'property' => 'type', 'notEmpty' => true],
                ],
            ]),

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions