php class ProductsController extends Phalcon Mvc Controller public fun

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
<?php
class ProductsController extends \Phalcon\Mvc\Controller {
public function indexAction(){
$this->view->setVar('_products', Products::find(array('limit' => '5', 'order' => 'id DESC', 'columns' => 'id, name')));
}
}
?>