ok

Mini Shell

Direktori : /home2/selectio/public_html/billingsoftwarenew/core/vendor/laramin/utility/src/
Upload File :
Current File : /home2/selectio/public_html/billingsoftwarenew/core/vendor/laramin/utility/src/GoToCore.php

<?php

namespace Laramin\Utility;

use App\Models\GeneralSetting;
use Closure;

class GoToCore{

    public function handle($request, Closure $next)
    {
        $fileExists = file_exists(__DIR__.'/laramin.json');
        $general = $this->getGeneral();
        if ($fileExists && $general->maintenance_mode != 9 && env('PURCHASECODE')) {
            return redirect()->route(VugiChugi::acDRouter());
        }
        return $next($request);
    }

    public function getGeneral(){
        $general = cache()->get('GeneralSetting');
        if (!$general) {
            $general = GeneralSetting::first();
        }
        return $general;
    }
}

Zerion Mini Shell 1.0