MicroFrameWork/kernel/middlewares/AuthMiddleware.php
2024-10-17 14:55:00 +03:00

19 lines
285 B
PHP

<?php
namespace kernel\middlewares;
use kernel\Middleware;
class AuthMiddleware extends Middleware
{
function handler()
{
if(!isset($_COOKIE['user_id']))
{
header('Location: /admin/login', true, 302);
return false;
}
}
}