<?php

namespace Src\Modules\Auth\Laravel;

use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\Providers\AppServiceProvider;

class AuthMiddleware {

    public function handle(Request $request, Closure $next, ...$guards)
    {        
        if(!Auth::user()){
            return redirect()->route('home');
        }
        return $next($request);
    }

}