public function index() { $this->respondTo('html', function () { $latests = Product::getLatest(12); $data = ['latests' => $latests]; $data = array_merge($this->getCommonData(), $data); $this->render(new TwigView('product/index.html', $data)); }); }