<?php
namespace App\Shared\Middlewares;
class Authenticate
{
    public function handle()
    {
        if (session_status() === PHP_SESSION_NONE) {
            session_start();
        }

        if (!isset($_SESSION['user'])) {
            header('Location: ' . url('/auth/login'));
            exit;
        }
    }
}