<?php
namespace App\Http\Middleware;
use App\Providers\RouteServiceProvider;
use Closure;
use Illuminate\Support\Facades\Auth;
use Session;
class Login
{
    public function handle($request, Closure $next)
    {
        if (!Session::has("username")){
			echo "<meta http-equiv='REFRESH'
				content = '3; url=pagelogin'>";
			die("You are not allowed to access");
		}
		
		return $next($request);
    }
	//Route::view("/contact","contactus")
	//->middleware(["App\Http\Middleware\Login"]);
}
