diff --git a/app/Http/Livewire/ShowPlanes.php b/app/Http/Livewire/ShowPlanes.php index ae7d1e7..4d66dcf 100755 --- a/app/Http/Livewire/ShowPlanes.php +++ b/app/Http/Livewire/ShowPlanes.php @@ -308,9 +308,15 @@ class ShowPlanes extends Component public function noRenovar() { // Corrección 1: Calcula la diferencia de días directamente + if (is_string($this->fecha_inicial_renovar)) { + $this->fecha_inicial_renovar = \Carbon\Carbon::createFromFormat('Y-m-d', $this->fecha_inicial_renovar); + } + + // Ahora puedes calcular la diferencia en días $this->tiempo_usuario = $this->fecha_inicial_renovar->diffInDays($this->fecha_inicial_renovar); $id = $this->id_cuentaVer; + dd('llegue'); // Corrección 2: Verifica que la cuenta exista antes de intentar actualizarla $cuenta = Cuentas::find($id); if ($cuenta) {