Update ShowPlanes.php

This commit is contained in:
lizandrogd
2024-05-11 18:37:03 -05:00
parent b83c310f36
commit 7bfc145001
+7 -2
View File
@@ -279,7 +279,12 @@ class ShowPlanes extends Component
{
$id = $this->id_cuentaVer;
$historial = Historial_cuenta::where('cuenta_id', $id)->get();
$historiales = Historial_cuenta::where('cuenta_id', $id)->get();
foreach ($historiales as $historial) {
$historial->delete();
}
$cuenta_renovar = Cuentas::find($id);
@@ -291,7 +296,7 @@ class ShowPlanes extends Component
'estado' => $this->estado,
]);
$historial->delete();
Log_historial::create([
'user_id' => Auth::user()->id,