Created
May 10, 2011 09:56
-
-
Save pinscript/964205 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'lib/Ava.php'; | |
$app = new Ava; | |
$app->using('domain'); | |
$app->enable('diagnostics'); | |
$app->get('/', function($r) { | |
$services = Service::all(); | |
render('index', array('services' => $services)); | |
}); | |
$app->get('/:slug', function($r) { | |
$service = Service::find_by_slug($r->slug); | |
render('info', array('service' => $service)); | |
}); | |
$app->dispatch(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment