ぬぬぬ
簡単なオレオレfw作りたいなあーと思ったけど、普通にsilexが便利で、ORMはdoctrineでviewはtwigさんやばいのでそれ使います。
こんな感じで使えちゃいますからのう…
<?php $sql = "select id, discription from items limit 50"; $items = $app['db']->fetchAll($sql); return $app['twig']->render('table.twig', array( "items" => $items ));
本気出せば一行(?)で…
<?php $app->get('/', function () use ($app) { return $app['twig']->render('table.twig', array( "items" => $app['db']->fetchAll("select id, discription from items limit 50") )); });
いんちきいんちき