Friday, June 3, 2016

Debug in HomeController


<?php
namespace MyApp\Controllers;
use Phalcon\Mvc\View;
use MyApp\Model\Products;
use MyApp\Model\Posts;
use MyApp\Model\ProductCategories;
class HomeController extends ControllerBase
{
public function indexAction() {
$products = new Products();
$this -> view -> products = $products -> findByLimit(6);
$posts = new Posts();
$this -> view -> posts = $posts -> findByLimit(4);
$this -> view -> titleForLayout = "Trang chủ - ".DEFAULT_NAME;
$categories = new ProductCategories();
$result = $categories->getMenuToTree();

echo "<pre>";
print_r($result);exit;
}

}


EmoticonEmoticon