renovar log historial
This commit is contained in:
@@ -229,6 +229,13 @@ class ShowPlanes extends Component
|
|||||||
|
|
||||||
Historial_cuenta::where('cuenta_id', $id)->delete();
|
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!', [
|
$this->alert('success', 'Cuenta renovada y liberada correctamente!', [
|
||||||
'position' => 'top'
|
'position' => 'top'
|
||||||
]);
|
]);
|
||||||
@@ -241,7 +248,7 @@ class ShowPlanes extends Component
|
|||||||
{
|
{
|
||||||
$id = $this->id_cuentaVer;
|
$id = $this->id_cuentaVer;
|
||||||
|
|
||||||
Cuentas::where('id', $id)->update([
|
$cuenta_renovar = Cuentas::where('id', $id)->update([
|
||||||
'correo' => $this->usuario_renovar,
|
'correo' => $this->usuario_renovar,
|
||||||
'password' => $this->password_renovar,
|
'password' => $this->password_renovar,
|
||||||
'inicio' => date('Y-m-d', strtotime(strval($this->fecha_inicial_renovar))),
|
'inicio' => date('Y-m-d', strtotime(strval($this->fecha_inicial_renovar))),
|
||||||
@@ -249,6 +256,11 @@ class ShowPlanes extends Component
|
|||||||
'estado' => $this->estado,
|
'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!', [
|
$this->alert('success', 'Cuenta renovada correctamente!', [
|
||||||
'position' => 'top'
|
'position' => 'top'
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user