© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
3 replies
Emaz

Multiple levels of relationships and chatGPT

Rooms are rarely changed (it's just names such as Kitchen, Bedroom 1 etc). A property has many rooms and rooms can be used by other properties, so many to many, right? And checklists are used by many rooms (these are cleaning checklists per each room) so again, many to many?

I need a repeater to attach rooms and checklists to a property, as well as multiple photos. So a user would set up a property and select rooms and checklists.

I have a pivot table property_room with property_id, room_id etc.

I thought this code would do it but all I get is

Filament\Support\Services\RelationshipJoiner::prepareQueryForNoConstraints(): Argument #1 ($relationship) must be of type Illuminate\Database\Eloquent\Relations\Relation, null given, called in /var/www/html/vendor/filament/forms/src/Components/Select.php on line 773

Don't hate me, I understand the perils of chatGPT and that it doesn't know v3 but it insists that the relationships are too complex for Filament and I need to overrride the save method. That does NOT feel right.

Would appreciate guidance here - can't find my use in the docs. Would love to get an example that has similar levels of many to many.
Screenshot_2024-04-04_at_12.45.40_PM.png
Solution
Figured it out. In case any else runs into this, this completely solved my issue. Now I have a new one I will post lol

https://filamentphp.com/docs/3.x/forms/fields/repeater#integrating-with-a-belongstomany-eloquent-relationship
Repeater - Form Builder - Filament
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Multiple Relationships
FilamentFFilament / ❓┊help
12mo ago
Multiple Relationships
FilamentFFilament / ❓┊help
15mo ago
multiple relationships with ->relationship()
FilamentFFilament / ❓┊help
3y ago
Multiple Select on Managing relationships
FilamentFFilament / ❓┊help
3y ago