Set conditions while setting up routes

How can I set conditions while setting up routes I’m using v2,
E.g
$app->get(’/’, function () use($app)
include ‘user.Class.php’;
});
$app->get(’/admin’, function () use($app)
include ‘admin.Class.php’;
});
$app->run();

if /admin opened, user.Class.php should not loaded,
Thanks
Sorry for bad English

Don’t use hard includes, but make use of autoloading.