Skip to content
Devin Smith edited this page Jan 21, 2016 · 33 revisions

Basic usage

use Tipsy\Tipsy;

$app = new Tipsy;
$app->get('home', function($View) {
	$View->display('home', [user => 'crystal']);
});
<h1>Hello <?=$user?></h1>

API & DBO usage

$app->post('drink/:id', function($Params, $Request, $Maitai) {
    $Maitai
        ->load($Params->id)
        ->serialize($Request->request())
        ->save();
    echo $Maitai->json()
});
POST /drink/1?rating=5&name=maitai

Example code

All example code is provided in their own repo with 1 click deployments provided free by Heroku.