本文整理汇总了PHP中Sample::category方法的典型用法代码示例。如果您正苦于以下问题:PHP Sample::category方法的具体用法?PHP Sample::category怎么用?PHP Sample::category使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sample
的用法示例。
在下文中一共展示了Sample::category方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getIndex
public function getIndex()
{
$category = Sample::category(Session::get('user_name'));
if ($category && $category->status == "success") {
$products = $category->products;
foreach ($products as $product) {
Session::put($product->shortName, $product->prodCode);
}
}
return View::make('retailer.dashboard.dashboard');
}
示例2: getShow
public function getShow($id)
{
$userdata = Sample::user($id);
if ($userdata && $userdata->status == "success") {
$userproducts = Sample::category($userdata->userId);
$adminproducts = Sample::category(Session::get('user_name'));
$usercategory = $userproducts->categories;
$userproduct = $userproducts->products;
$admincategory = $adminproducts->categories;
$adminproduct = $adminproducts->products;
return View::make('superadmin.admin.editview')->with('userdata', $userdata)->with('usercategory', $usercategory)->with('userproduct', $userproduct)->with('admincategory', $admincategory)->with('adminproduct', $adminproduct);
} else {
return View::make('superadmin.service');
}
}
示例3: getRetailerprod
public static function getRetailerprod($admin)
{
$userdata = Sample::category($admin);
//$userdata=json_decode($senddata);
//print_r($userdata);exit;
$category = $userdata->categories;
$products = $userdata->products;
foreach ($category as $categories) {
echo "<li class='parent-list'><input type='checkbox' name='' class='canine parent' />" . $categories->fullName . " <i class='fa fa-arrow-down'></i><ul>";
foreach ($products as $product) {
if ($product->catgCode == $categories->catgCode) {
echo "<li><input type='checkbox' name='prodCode[]' class='canine' id='' value='" . $product->prodCode . "'/>" . $product->fullName . "</li>";
}
}
echo "</ul></li>";
}
}
示例4: getShow
public function getShow($id)
{
$userdata = Sample::user($id);
if ($userdata && $userdata->status == "success") {
$userproducts = Sample::category($userdata->userId);
$adminproducts = Sample::category($userdata->parentId);
$usercategory = $userproducts->categories;
$userproduct = $userproducts->products;
$admincategory = $adminproducts->categories;
$adminproduct = $adminproducts->products;
return View::make('admin.subretailer.editview')->with('userdata', $userdata)->with('usercategory', $usercategory)->with('userproduct', $userproduct)->with('admincategory', $admincategory)->with('adminproduct', $adminproduct);
} else {
return Redirect::to('admin/noservice');
}
}
示例5: getPancardmanage
public static function getPancardmanage()
{
$category = Sample::category(Session::get('user_name'));
if ($category) {
$products = $category->products;
foreach ($products as $product) {
if ($product->prodCode == '2001') {
$sendata = Services::getpan();
$senddata = json_decode($sendata);
//print_r($sendata); exit;
if ($sendata && $senddata->status == "success") {
$pandata = $senddata->panForms;
return View::make('subretailer.pancard.manageview')->with('pandata', $pandata);
} else {
$pandata = "";
return View::make('subretailer.pancard.manageview')->with('pandata', $pandata);
}
}
}
} else {
return View::make('service');
}
}
示例6: getPancardmanage
public static function getPancardmanage()
{
$category = Sample::category(Session::get('user_name'));
if ($category) {
$products = $category->products;
//echo "<pre>";print_r(Session::all()); exit;
foreach ($products as $product) {
if ($product->prodCode == '2001') {
$sendata = Services::getpan();
$senddata = json_decode($sendata);
//print_r($senddata); exit;
if ($senddata) {
$pandata = $senddata->panForms;
}
return View::make('retailer.pancard.manageview')->with('pandata', $pandata);
}
}
return View::make('retailer.static');
} else {
return View::make('retailer.service');
}
}