UnknownSec Bypass
403
:
/
mnt
/
lmsestudio-instance-vol002
/
lms_7f93fa0eff5f
/
database
/
seeds
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
AdjustEndDateOfHiredCourses.php
<?php use EstudioLMS\Models\Financial\HireDetail; use EstudioLMS\Models\Financial\HireHeader; use EstudioLMS\Models\Environment\HiredCourse; use Illuminate\Database\Seeder; use EstudioLMS\Models\Financial\Plan; class AdjustEndDateOfHiredCourses extends Seeder { public function run() { $details = HireDetail::all(); foreach ($details as $key => $detail) { $plan = Plan::with(['duration'])->find($detail['plan_id']); $duration = $plan['duration']['duration']; $startDate = $detail['start']; $addDate = '+' . $duration . ' months'; $endDate = date('Y-m-d', strtotime($addDate, strtotime($startDate))); if ($detail['status'] == 10) { $this->command->info('Achei - ' . $detail['hire_headers_id'] . ' - ' . $endDate); HireDetail::find($detail['id'])->update( [ 'end' => $endDate, 'status' => 3 ] ); HiredCourse::where('hire_headers_id', '=', $detail['hire_headers_id']) ->update( [ 'status' => 3 ] ); HireHeader::find($detail['hire_headers_id']) ->update( [ 'status' => 3 ] ); } } $this->command->info('Finalizado!'); } }
Copyright © 2026 - UnknownSec