Skip to content

Instantly share code, notes, and snippets.

@vlucas
Created October 13, 2014 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vlucas/6eab10aad87e3017cec9 to your computer and use it in GitHub Desktop.
Save vlucas/6eab10aad87e3017cec9 to your computer and use it in GitHub Desktop.
<?php
// snip ...
// Marketing site routes (www. or no subdomain)
$app->subdomain(['www', false], function($request) use($siteRoutesDir) {
Bullet\View\Template::config(array(
'path' => BULLET_APP_ROOT . '/templates/',
'path_layouts' => BULLET_APP_ROOT . '/templates/layout/site/',
'auto_layout' => 'inner'
));
require $siteRoutesDir . 'index.php';
});
// Application/API Routes (app.domain.com or api.domain.com)
$app->subdomain(['app', 'api'], function($request) use($routesDir) {
require $routesDir . 'index.php';
require $routesDir . 'events.php';
require $routesDir . 'messages.php';
require $routesDir . 'groups.php';
require $routesDir . 'devices.php';
require $routesDir . 'users.php';
// DB tasks (admin only)
require $routesDir . 'db.php';
});
// snip ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment