Tab::make('config')->label('Config')->schema([
FieldSet::make()->relationship('detail')->schema([
Select::make('sms_type_id')
->options(SmsType::all()->pluck('name', 'id'))
->afterStateUpdated(function (?string $state, ?Model $record) {
$record->sms_type_id = $state;
// $record->location_id = $location->id; <---need to set this parent ID relationship.
$record->save();
}),
Tab::make('config')->label('Config')->schema([
FieldSet::make()->relationship('detail')->schema([
Select::make('sms_type_id')
->options(SmsType::all()->pluck('name', 'id'))
->afterStateUpdated(function (?string $state, ?Model $record) {
$record->sms_type_id = $state;
// $record->location_id = $location->id; <---need to set this parent ID relationship.
$record->save();
}),