本文整理匯總了PHP中SiteHelpers::mainCategory方法的典型用法代碼示例。如果您正苦於以下問題:PHP SiteHelpers::mainCategory方法的具體用法?PHP SiteHelpers::mainCategory怎麽用?PHP SiteHelpers::mainCategory使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SiteHelpers
的用法示例。
在下文中一共展示了SiteHelpers::mainCategory方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
@extends('frontend.index')
@section('content')
<?php
$categories = SiteHelpers::mainCategory('category');
$currentRoute = Route::current();
$parameters = $currentRoute->parameters();
if ($parameters) {
$cat = SiteHelpers::CF_decode_json($parameters['one']);
if (is_array($cat)) {
$pollNext[0] = $cat[0];
$pollNext[1] = $cat[1];
} else {
$pollNext[0] = $cat;
$pollNext[1] = '';
}
} else {
$pollNext[0] = '';
$pollNext[1] = '';
}
// echo "<pre>";print_r($polls);die;
if (isset($polls)) {
$pollNext[2] = $polls->pk_poll_id;
} else {
$pollNext[2] = '';
}
$nextPollArr = SiteHelpers::CF_encode_json($pollNext);
?>
<div class="main-banner m-none">
<img src="{{ URL::asset('images/banner-main.jpg') }}" alt="">
<!--main-banner --></div>
示例2:
$linkSelect = SiteHelpers::CF_encode_json($parameters);
if ($parameters) {
$cat = SiteHelpers::CF_decode_json($parameters['one']);
if (is_array($cat)) {
$categoryId = $cat[1];
} else {
$categoryId = $cat;
}
} else {
$categoryId = 'all';
}
/*if($params)
{
}*/
$subCategories = SiteHelpers::mainCategory($categoryId);
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0" />
<title>:: The Indian Edition ::</title>
<link type="text/css" rel="stylesheet" href="{{ URL::asset('css/layout.css') }}">
<link type="text/css" rel="stylesheet" href="{{ URL::asset('css/iPad.css') }}">
<link type="text/css" rel="stylesheet" href="{{ URL::asset('css/mobile-small.css') }}">
<link type="text/css" rel="stylesheet" href="{{ URL::asset('css/mobile-480.css') }}">
<link rel="stylesheet" type="text/css" href="{{ URL::asset('css/magnific-popup.css') }}"/>
<link type="text/css" rel="stylesheet" href="{{ URL::asset('css/font-awesome.min.css') }}">
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="{{ URL::asset('scripts/jquery-1.10.2.min.js') }}"></script>