<?php

namespace App\Http\Middleware;

use Closure;
use App\Models\CompanyData;

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

        $def=CompanyData::orderBy('id','desc')->first();
                if($def->View != 1)
                {
                   return redirect('/');
                }       

        return $next($request);
    }
}



