© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•13mo ago•
3 replies
HGalih

Select with relationship inside repeater return null.

This must be something really stupid. But I've triple check all the relationship naming.

TradingPostResource.php
 Forms\Components\Repeater::make('trading_post_periodes')
                    ->columnSpanFull()
                    ->schema([
                        Select::make('periode_id')
                            ->required()
                            ->relationship('periode', 'periode_name'),
                        Forms\Components\TextInput::make('capacity')
                            ->required()
                            ->numeric()
                            ->default(25),
                    ]),
            ]);
 Forms\Components\Repeater::make('trading_post_periodes')
                    ->columnSpanFull()
                    ->schema([
                        Select::make('periode_id')
                            ->required()
                            ->relationship('periode', 'periode_name'),
                        Forms\Components\TextInput::make('capacity')
                            ->required()
                            ->numeric()
                            ->default(25),
                    ]),
            ]);


TradingPostPeriode.php
    public function periode()
    {
        return $this->belongsTo(Periode::class);
    }
    public function periode()
    {
        return $this->belongsTo(Periode::class);
    }


Error
Filament\Support\Services\RelationshipJoiner::prepareQueryForNoConstraints(): Argument #1 ($relationship) must be of type Illuminate\Database\Eloquent\Relations\Relation, null given, called in C:\Users\hanin\OneDrive\Documents\Eternity9\vendor\filament\forms\src\Components\Select.
Filament\Support\Services\RelationshipJoiner::prepareQueryForNoConstraints(): Argument #1 ($relationship) must be of type Illuminate\Database\Eloquent\Relations\Relation, null given, called in C:\Users\hanin\OneDrive\Documents\Eternity9\vendor\filament\forms\src\Components\Select.
Solution
Okay, I forgot to define the relationship on repeater. It's been a while since I touch filament. I thought filament pick up the relationship immidiately from repeater column name
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

Repeater relationship select
FilamentFFilament / ❓┊help
13mo ago
Select with Relationship always Null
FilamentFFilament / ❓┊help
2y ago
Repeater relationship returns null
FilamentFFilament / ❓┊help
2y ago
Slow select relationship in a relationship repeater
FilamentFFilament / ❓┊help
2y ago