Merge branch 'main' of https://github.com/lizandrogd/sirpremiumv2
This commit is contained in:
@@ -9,11 +9,11 @@ LOG_DEPRECATIONS_CHANNEL=null
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=82.180.168.2
|
||||
DB_HOST=195.35.32.59
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=u111286300_sir
|
||||
DB_USERNAME=u111286300_sir
|
||||
DB_PASSWORD=Colombia2022*
|
||||
DB_DATABASE=sirpremium
|
||||
DB_USERNAME=pym
|
||||
DB_PASSWORD=Nicolas2796*+
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
|
||||
@@ -34,6 +34,11 @@ class Kernel extends ConsoleKernel
|
||||
{
|
||||
$schedule->exec('nohup php /home/u111286300/domains/sirpremium.com.co/public_html/app/artisan queue:work --sleep=3 --tries=3 > /dev/null 2>&1 &')->everyMinute();
|
||||
|
||||
|
||||
|
||||
// $schedule->exec('nohup php /var/www/sirpremium/artisan queue:work --sleep=3 --tries=3 > /dev/null 2>&1 &')->everyMinute();
|
||||
|
||||
|
||||
$schedule->call(function () {
|
||||
$fechaHoy = Carbon::now();
|
||||
$fechaManana = $fechaHoy->copy()->addDay(); // Obtenemos la fecha de mañana sumando un día a la fecha actual
|
||||
|
||||
@@ -63,10 +63,10 @@ class ShowIndexPromo extends Component
|
||||
|
||||
if (is_null($usuario_existe)) {
|
||||
$usuario = new User;
|
||||
$usuario->name = $this->nombre_tarjetaPlan;
|
||||
$usuario->email = $this->email_tarjetaPlan;
|
||||
$usuario->name = $this->nombre_comprarPromo;
|
||||
$usuario->email = $this->email_comprarPromo;
|
||||
$usuario->password = '123';
|
||||
$usuario->celular = $this->celular_tarjetaPlan;
|
||||
$usuario->celular = $this->celular_comprarPromo;
|
||||
$usuario->save();
|
||||
|
||||
$usuario_id = $usuario->id;
|
||||
|
||||
@@ -316,6 +316,25 @@ class ShowPromociones extends Component
|
||||
'confirmButtonText' => 'Sí, comprar.',
|
||||
]);
|
||||
}
|
||||
}else{
|
||||
|
||||
|
||||
$descuento = Saldo::where('usuario_id', Auth::user()->id)->first();
|
||||
$saldo_anterior = $descuento->valor;
|
||||
$nuevo_saldo = $saldo_anterior - ($this->precioAhora *$this->cantidad_comprarPromo);
|
||||
$cobro = $descuento->update(['valor' => $nuevo_saldo]);
|
||||
//dd($cobro);
|
||||
if ($cobro) {
|
||||
$historial->update(['estado' => 'activo']);
|
||||
$this->modalComprarPromo = false;
|
||||
$this->credenciales($historial);
|
||||
|
||||
} else {
|
||||
$eliminar = Historial_cuenta::whereIn('id',$this->n)->delete();
|
||||
//dd($eliminar);
|
||||
$this->alert('warning', 'Error en el cobro, comuniquese con soporte!', [
|
||||
'position' => 'top']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1004,6 +1004,7 @@
|
||||
@if (!empty($cuenta->servicio->ver_url))
|
||||
*URL:* {{ $cuenta->servicio->url }}
|
||||
@else
|
||||
|
||||
*Servicio:* {{ $cuenta->servicio->nombre }} @foreach ($cuenta->perfil as $perfil)
|
||||
@if ($cuentas->id == $perfil->historial_id && $cuenta->estado == 'activo')
|
||||
- Perfil {{ $perfil->perfil }} @if (!empty($cuenta->servicio->perfiles))
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
@php
|
||||
$n = 0;
|
||||
@endphp
|
||||
{{ dd($cuentas->cuentas) }}
|
||||
|
||||
@foreach ($cuentas->cuentas->unique() as $cuenta)
|
||||
@php
|
||||
$n++;
|
||||
|
||||
Reference in New Issue
Block a user