UnknownSec Bypass
403
:
/
mnt
/
lmsestudio-instance-vol002
/
lms_3fa2e970a29f
/
app
/
Console
/
Commands
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
CheckStudentsOverdue.php
<?php namespace EstudioLMS\Console\Commands; use EstudioLMS\Repositories\Environment\HiredCourseRepository; use EstudioLMS\Repositories\Financial\BillingRepository; use EstudioLMS\Repositories\Financial\HiringInterface; use EstudioLMS\Services\Admin\BillingServices; use Illuminate\Console\Command; /** * Class CheckStudentsOverdue * @package EstudioLMS\Console\Commands */ class CheckStudentsOverdue extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'overdue:check'; /** * The console command description. * * @var string */ protected $description = 'Faz a verificação de todos os registros da tabela de boletos e marca os que estiverem em atraso. Também verifica os contratos de curso com validade vencida e muda seu status.'; /** * @var BillingRepository */ private $billingRepository; /** * @var BillingServices */ private $billingServices; /** * @var HiredCourseRepository */ private $hiredCourseRepository; /** * @var HiringInterface */ private $hiring; /** * Create a new command instance. * * @param BillingRepository $billingRepository * @param BillingServices $billingServices * @param HiredCourseRepository $hiredCourseRepository * @param HiringInterface $hiring */ public function __construct( BillingRepository $billingRepository, BillingServices $billingServices, HiredCourseRepository $hiredCourseRepository, HiringInterface $hiring ) { parent::__construct(); $this->billingRepository = $billingRepository; $this->billingServices = $billingServices; $this->hiredCourseRepository = $hiredCourseRepository; $this->hiring = $hiring; } /** * Execute the console command. * * @return string */ public function handle() { $billings = $this->billingRepository ->findWhere( [ ['due_date', '<', date('Y-m-d H:i:s')], ['billing_status_id', '=', 1] ] ) ->all(); foreach ($billings as $key => $billing) { $this->billingRepository->update(['billing_status_id' => 2], $billing->id); $this->billingServices->blockCourseForBillingOverdue($billing->id); } $endPeriod = $this->hiring->findWhere([ ['end', '<', date('Y-m-d H:i:s')], ['status', '<>', 10] ])->all(); foreach ($endPeriod as $key => $value) { $this->hiredCourseRepository->updateStatusByHeaderId($value->id, $value->course_id, 10); $this->hiring->update(['status' => 10], $value->id); } \Log::useDailyFiles(storage_path() . '/logs/command.log'); \Log::alert('CheckStudentsOverdue - Executado - ' . date('Y-m-d H:i:s')); return 'All Students Overdue Billings and Course Status Updated'; } }
Copyright © 2026 - UnknownSec