<?php
namespace App\Http\Middleware;

use Closure;

class IsLoggedIn
{
	public function handle($request, Closure $next)
	{
		if($request->get('user_access_level') == 1) {
			return response()->json([
				'error'	=>	'Unauthorized, Access Denied!'
			], 401);
		}

		return $next($request);
	}
}