© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago
shebaoting

How to show associated attachment model images in forms?

Currently there is the IdentityVerification model. IdentityVerification and Attachment are one-to-many relationships. I want to display the Attachment of the current message in the resource edit page of IdentityVerification, what should I do?

    public function attachments()
    {
        return $this->hasMany(Attachment::class, 'model_id');
    }
    public function attachments()
    {
        return $this->hasMany(Attachment::class, 'model_id');
    }



 Section::make('info')
                    ->description('info')
                    ->aside()
                    ->schema([
                        Repeater::make('attachments')
                            ->relationship()
                            ->schema([
                                FileUpload::make('paths')->image()
                            ])
                            ->addable(false)
                            ->deletable(false)
                    ])
 Section::make('info')
                    ->description('info')
                    ->aside()
                    ->schema([
                        Repeater::make('attachments')
                            ->relationship()
                            ->schema([
                                FileUpload::make('paths')->image()
                            ])
                            ->addable(false)
                            ->deletable(false)
                    ])


paths
paths
is the field associated with the model attachment. It is the address of an image. I want it to show up. I don't know how to do it.
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to show Images in a repeater
FilamentFFilament / ❓┊help
3y ago
Show orderitems associated with orders
FilamentFFilament / ❓┊help
2y ago
How to add multiple images to a model
FilamentFFilament / ❓┊help
3y ago
How to access $form in Forms?
FilamentFFilament / ❓┊help
2y ago