<?php

namespace App\Http\Middleware;

use App\Repositories\Shop\Customers;
use Closure;
use Illuminate\Http\Request;

class CheckAuth
{
    public function handle(Request $request, Closure $next)
    {
        if (Customers::isNotConnected()) {
            return redirect('/login');
        }

        return $next($request);
    }
}
