<?php
	namespace Main\Middlewares;
	
	use Pecee\Http\Middleware\IMiddleware;
	use Pecee\Http\Request;
	
	class ProtectedRouteMiddleware implements IMiddleware {
		public function handle(Request $request): void
		{
			if (!auth()->check()) {
				redirect(url('auth.login'));
			}
		}
	}