renovar log historial

This commit is contained in:
Felipe
2024-03-01 10:51:11 -05:00
parent accc509652
commit bdf8995a40
+13 -1
View File
@@ -229,6 +229,13 @@ class ShowPlanes extends Component
Historial_cuenta::where('cuenta_id', $id)->delete();
$cuenta_renovar = Cuentas::find($id);
Log_historial::create([
'user_id' => Auth::user()->id,
'detalle' => 'El usuario ha renovado la cuenta ' . $cuenta_renovar->correo
]);
$this->alert('success', 'Cuenta renovada y liberada correctamente!', [
'position' => 'top'
]);
@@ -241,7 +248,7 @@ class ShowPlanes extends Component
{
$id = $this->id_cuentaVer;
Cuentas::where('id', $id)->update([
$cuenta_renovar = Cuentas::where('id', $id)->update([
'correo' => $this->usuario_renovar,
'password' => $this->password_renovar,
'inicio' => date('Y-m-d', strtotime(strval($this->fecha_inicial_renovar))),
@@ -249,6 +256,11 @@ class ShowPlanes extends Component
'estado' => $this->estado,
]);
Log_historial::create([
'user_id' => Auth::user()->id,
'detalle' => 'El usuario ha renovado la cuenta ' . $cuenta_renovar->correo
]);
$this->alert('success', 'Cuenta renovada correctamente!', [
'position' => 'top'
]);