<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;

class WhmcsAuth
{
    public function handle(Request $request, Closure $next)
    {
        if (!session()->has('whmcs_user')) {
            return redirect()->route('login');
        }

        return $next($request);
    }
}
