Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

silverhand's avatar

FilamentPHP Action modal for HasMany relationship

I’m trying to make an action modal for HasMany relationship.

When I debug this code:

$this->form([
            Grid::make()
                ->relationship('user')
                ->schema([
                    Grid::make()
                        ->schema([
                            Repeater::make('userDocuments')
                                ->relationship('userDocuments')
                                ->hiddenLabel()
                                ->schema(
                                    UserDocumentForm::getForm()
                                )
                                ->defaultItems(1),
                        ])
                        ->columns(1),
                ]),

        ]);
  • The relationship of ‘user’ found: App\Models\User
  • The relationship of 'userDocuments' was also found: App\Models\UserDocument with multiple records.

But the Repeater form is not showing the records of the UserDocument collection, even though the records exist.

Thank you very much for your help.

0 likes
1 reply

Please or to participate in this conversation.