Select::make('product_id')
->label('Product')
->translateLabel()
->relationship('product', 'name')
->searchable()
->preload()
->live()
->afterStateUpdated(function (callable $set, $state) {
$product = Product::find($state);
$set('name', $product->name);
Select::make('product_id')
->label('Product')
->translateLabel()
->relationship('product', 'name')
->searchable()
->preload()
->live()
->afterStateUpdated(function (callable $set, $state) {
$product = Product::find($state);
$set('name', $product->name);