public static function getPageByCode($code) { return Pages::where('code', $code)->where('active', 1)->first(); return new \stdClass(); }
public function detailAction(request $req, $res, $args) { if ($args['pageCode']) { $this->data['pageData'] = PageFactory::getPageByCode($args['pageCode']); } else { $this->data['pageData'] = PageFactory::getPageWithRequest($req); } $this->setRequestResult($req, $res); $this->render('public\\main\\pages\\detail_page.twig'); }