コード例 #1
0
ファイル: Dataset.php プロジェクト: yash19970/rapyd-framework
 public function indexAction()
 {
     $ds = $this->set->createBuilder();
     $ds->setSource(Article::with("comments", "author"));
     $ds->setPagination(5);
     $ds->getSet();
     $this->render('Set', array('ds' => $ds));
 }
コード例 #2
0
 public function indexAction()
 {
     //dataset widget
     $dg = $this->grid->createBuilder();
     $dg->setSource(Article::with("author"));
     $dg->setPagination(10);
     $dg->add('article_id', "ID", true);
     $dg->add('title', "title");
     $dg->add('<em>{{ article.author.firstname|lower }}</em>', "author");
     $dg->getGrid();
     $this->render('Grid', array('dg' => $dg));
 }
コード例 #3
0
 public function indexAction()
 {
     //get first article using an eloquent model
     $article = Article::with("author")->find(1);
     $this->render('Eloquent', array('article' => $article));
 }