Select::make('variations')
->required()
->translateLabel()
->reactive()
->options(function (callable $get) {
$services = Variation::where('service_id', $get('service_id'))->pluck('name', 'price');
if ($services) {
return $services->toArray();
}
})
->preload()
->searchable(),
TextInput::make('price')
->placeholder(fn (callable $get) => $get('variations'))
->default(fn (callable $get) => $get('variations'))
->default(fn (Get $get) => $get('variations'))
Select::make('variations')
->required()
->translateLabel()
->reactive()
->options(function (callable $get) {
$services = Variation::where('service_id', $get('service_id'))->pluck('name', 'price');
if ($services) {
return $services->toArray();
}
})
->preload()
->searchable(),
TextInput::make('price')
->placeholder(fn (callable $get) => $get('variations'))
->default(fn (callable $get) => $get('variations'))
->default(fn (Get $get) => $get('variations'))