olivier_oursblanc
olivier_oursblanc
FFilament
Created by olivier_oursblanc on 8/11/2023 in #❓┊help
Multi-select in relationship doesn't display values on edit
Yes values in table are correct
11 replies
FFilament
Created by olivier_oursblanc on 8/11/2023 in #❓┊help
Multi-select in relationship doesn't display values on edit
The problem occur only when i have Pivot field and using it in ->wherePivot
11 replies
FFilament
Created by olivier_oursblanc on 8/11/2023 in #❓┊help
Multi-select in relationship doesn't display values on edit
No changes
11 replies
FFilament
Created by olivier_oursblanc on 8/11/2023 in #❓┊help
Multi-select in relationship doesn't display values on edit
I try but it's not working better The code in the ressource : Forms\Components\Select::make('packages') ->label(__('smartxsp::campaign.edit-packages')) ->helperText(__('smartxsp::campaign.edit-packages-help')) ->multiple() ->relationship( name: 'packages', titleAttribute: 'name', modifyQueryUsing: fn (Builder $query) => Package::allowed(), ) ->getOptionLabelFromRecordUsing(fn (Package $record) => "{$record->name}") ->searchable(['name']) ->forceSearchCaseInsensitive() ->columnSpan("full") ->preload() , And in Eloquent model : public function packages() { return $this->belongsToMany(\SmartXSP\Brain\Models\Package::class)->wherePivot('exclude', 0)->withPivot('exclude'); }
11 replies
FFilament
Created by olivier_oursblanc on 8/11/2023 in #❓┊help
Multi-select in relationship doesn't display values on edit
Yes their are correctly saved, it's a belongToMany relationship
11 replies