FilamentF
Filament2y ago
Gush

Select with relationship default

Select::make('customer_group_id')
                                    ->label(__('nlmn-customer-module::customer.customer_resource.customer_group_id'))
                                    ->relationship('customer_group', 'name')
                                    ->preload()
                                    ->multiple()
                                    ->searchable()
                                    ->native(false),


How do i say i want the default group to be "geral" that has ID 1
Solution
->default([1])
Was this page helpful?