© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
16 replies
ThatWebGuy

Saving related items when editing/creating a resource

Hi Everyone,

I'm trying to setup so that when I'm on the create/edit screen of my resource, I can add multiple items with a repeater and upon saving, those additional items are saved to their corresponding table.

ClientResource.php Form
Repeater::make('contacts')
 ->relationship()
 ->schema([])
Repeater::make('contacts')
 ->relationship()
 ->schema([])


Client Model
public function contacts() {
    return $this->hasMany(Contact::class);
}
public function contacts() {
    return $this->hasMany(Contact::class);
}


When the client resource creation runs, it creates the client item but doesn't create the contact(s).
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

create and attach related models when creating resource
FilamentFFilament / ❓┊help
3y ago
Editing related models in their own Resource
FilamentFFilament / ❓┊help
2y ago
Saving resource when executing Action
FilamentFFilament / ❓┊help
12mo ago
Custom message when saving/creating
FilamentFFilament / ❓┊help
3y ago