Tables\Actions\EditAction::make()->mutateRecordDataUsing(function (array $data): array {
$prix = DB::table('com_srv_prices')
->where('srv_id', $data['id'])
->value('mnt_ttc');
$tva = DB::table('com_srv_prices')
->where('srv_id', $data['id'])
->value('tva');
$data['tva'] = $tva;
$data['prix'] = $prix;
return $data;
})
])
Tables\Actions\EditAction::make()->mutateRecordDataUsing(function (array $data): array {
$prix = DB::table('com_srv_prices')
->where('srv_id', $data['id'])
->value('mnt_ttc');
$tva = DB::table('com_srv_prices')
->where('srv_id', $data['id'])
->value('tva');
$data['tva'] = $tva;
$data['prix'] = $prix;
return $data;
})
])