<?php $cg = new Categorie(); $cg->get(); foreach ($cg->all as $cat) { echo "<option value = '" . $cat->id . "'>" . $cat->name . "</option>"; }
/** * 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}"))); }