Current File : /home/tradevaly/ladybagcollection.com/project/app/Http/Middleware/MaintenanceMode.php
<?php

namespace App\Http\Middleware;
use App\Models\Generalsetting;
use Closure;

class MaintenanceMode
{
    public function handle($request, Closure $next)

    {
        $gs = Generalsetting::find(1);

            if($gs->is_maintain == 1) {
                return redirect()->route('front-maintenance');
            }

            return $next($request);

    }
}