Applying Middleware
Making routes go through middleware before being sent to controllers.
Router::add_route('GET', '/admin', [AdminController::class, 'index'])->middleware(Auth::class);use sirJuni\Framework\Middleware\Auth; // add this line below the autoload.php
Auth::set_fallback_route('/login'); // if user visits /admin without authentication
// they will be redirected to /loginLast updated