本文整理汇总了PHP中Home::getTypes方法的典型用法代码示例。如果您正苦于以下问题:PHP Home::getTypes方法的具体用法?PHP Home::getTypes怎么用?PHP Home::getTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Home
的用法示例。
在下文中一共展示了Home::getTypes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: errors
public static function errors($code = 404, $title = '', $message = '')
{
$ajax = Request::ajax();
if (!$code) {
$code = 500;
$title = 'Internal Server Error';
$message = 'We got problems over here. Please try again later!';
} else {
if ($code == 404) {
$title = 'Oops! You\'re lost.';
$message = 'We can not find the page you\'re looking for.';
}
}
if (Request::ajax()) {
return Response::json(['error' => ['message' => $message]], $code);
}
$arrData = [];
$arrData['content'] = View::make('frontend.errors.error')->with(['title' => $title, 'code' => $code, 'message' => $message]);
$arrData['metaInfo'] = Home::getMetaInfo();
$arrData['metaInfo']['meta_title'] = $title;
$arrData['types'] = Home::getTypes();
$arrData['categories'] = Home::getCategories();
$arrData['headerMenu'] = Menu::getCache(['header' => true]);
return View::make('frontend.layout.default')->with($arrData);
}