error with relationship

why i have this error. ( i really have no idea dd ) https://flareapp.io/share/x5MWyJwP
code:
Repeater::make('purchaseBrands')
                    ->relationship()
                    ->schema([
                        Select::make('brand_id')
                            ->label('Brand')
                            ->relationship('brand', 'name', function (Builder $query, Get $get) {
                                if($get('../../supplier_id') === null) {
                                    return;
                                }
                                $brandIds = Supplier::find($get('../../supplier_id'))->brand_id;
                                $query->whereIn('id', $brandIds);
                            })
                            ->searchable()
                            ->disableOptionsWhenSelectedInSiblingRepeaterItems()
                    ->required()
                            ->preload()
                            ->createOptionForm([
                                TextInput::make('name')
                                    ->required()
                                    ->label('New Brand'),
                                TextInput::make('brand_amount')
                                    ->numeric()
                                    ->required()
                            ]),
                        TextInput::make('amount')->required()
                            ->required(),
                    ])
problem is with relationship
Flare
Filament\Support\Services\RelationshipJoiner::prepareQueryForNoConstraints(): Argument #1 ($relationship) must be of type Illuminate\Database\Eloquent\Relations\Relation, null given, called in /var/www/html/shesyidvebi/vendor/filament/forms/src/Components/Select.php on line 764 - The error occurred at http://127.0.0.1:8000/admin/purchases/5/edit
Solution
its my problem dd
Was this page helpful?