Skip to content

Instantly share code, notes, and snippets.

@pinscript
Created May 10, 2011 09:56
Show Gist options
  • Save pinscript/964205 to your computer and use it in GitHub Desktop.
Save pinscript/964205 to your computer and use it in GitHub Desktop.
<?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