Ejemplo n.º 1
0
<?php

$cg = new Categorie();
$cg->get();
foreach ($cg->all as $cat) {
    echo "<option value = '" . $cat->id . "'>" . $cat->name . "</option>";
}
Ejemplo n.º 2
0
 /**
  * Display a listing of the resource.
  * GET /categories
  *
  * @return Response
  */
 public function index()
 {
     return Response::json(Categorie::get());
 }
function detalhe($id)
{
    global $twig;
    $categorie = new Categorie();
    echo $twig->render('categorie_detail.html', array('categorie' => $categorie->get("id = {$id}")));
}