本文整理汇总了PHP中category::getActiveCategory方法的典型用法代码示例。如果您正苦于以下问题:PHP category::getActiveCategory方法的具体用法?PHP category::getActiveCategory怎么用?PHP category::getActiveCategory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类category
的用法示例。
在下文中一共展示了category::getActiveCategory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dashboard
public function dashboard(Request $data)
{
$objUsersModel = User::getInstance();
$where['rawQuery'] = 1;
$Allusers = $objUsersModel->getAllUsers($where);
$totalUsers = count($Allusers);
// $objReview = new review();
// $result1 = $objReview->getReviews();
// $totalReview =count($result1);
// $objBusinesszModel = Business::getInstance();
// $where['rawQuery'] = 1;
// $selectedColumns = ['business.*', 'category.category_name', 'subcategory.subcategory_name','user_meta.full_name','user_meta.primary_phone'];
// $allBusinessCount = $objBusinesszModel->getAllDetails($selectedColumns);
// $totalBusiness =count($allBusinessCount);
//
// $objReport = new report();
// $Allreport=$objReport->getAllReports();
// $totalReport =count($Allreport);
// print_r($totalReport);
// die;
$objCategory = new category();
$result2 = $objCategory->getActiveCategory();
$totalCategory = count($result2);
return view("Admin/Views/admin/dashboard", ['totalUsers' => $totalUsers], ['totalCategory' => $totalCategory]);
}
示例2: fileReport
public function fileReport(Request $data)
{
if (Session::has('report.user_id')) {
$userid = Session::get('report.user_id');
} else {
$userid = Auth::user()->id;
}
if ($data->isMethod('post')) {
$steponecompanyname = $data->input('steponecompanyname');
$steponeakaname = $data->input('steponeakaname');
$steponewebaddress = $data->input('steponewebaddress');
$steponelocationtype = $data->input('steponelocationtype');
if ($steponelocationtype == 1) {
$steponestreet = "";
$steponecity = "";
$steponestate = "Nationalwide";
$steponezip = "";
$steponecountry = "";
} else {
if ($steponelocationtype == 2) {
$steponestreet = "";
$steponecity = "";
$steponestate = "Internet";
$steponezip = "";
$steponecountry = "";
} else {
$steponestreet = $data->input('steponestreet');
$steponecity = $data->input('steponecity');
$steponestate = $data->input('steponestate');
$steponezip = $data->input('steponezip');
$steponecountry = $data->input('steponecountry');
}
}
$steponefax = $data->input('steponefax');
$steponephone = $data->input('steponephone');
$steponeemail = $data->input('steponeemail');
Session::forget('report.stepone');
$reportstepone = array();
$reportstepone['companyname'] = $steponecompanyname;
$reportstepone['aka'] = $steponeakaname;
$reportstepone['webaddress'] = $steponewebaddress;
$reportstepone['locationtype'] = $steponelocationtype;
$reportstepone['streetaddress'] = $steponestreet;
$reportstepone['city'] = $steponecity;
$reportstepone['state'] = $steponestate;
$reportstepone['zipcode'] = $steponezip;
$reportstepone['country'] = $steponecountry;
$reportstepone['fax'] = $steponefax;
$reportstepone['phone'] = $steponephone;
$reportstepone['email'] = $steponeemail;
Session::put('report.stepone', $reportstepone);
return redirect('/filereport?step=2');
}
if ($data->isMethod('get')) {
$step = $data->input('step');
if ($step == 2) {
$objCategory = new category();
$category = $objCategory->getActiveCategory();
if (Session::has('report.stepone') && Session::has('report.steptwo')) {
$steponesession = Session::get('report.stepone');
$steptwosession = Session::get('report.steptwo');
$objCategory = new category();
$subcategory = $objCategory->getActiveSubCategory($steptwosession['category']);
if (!$subcategory) {
$subcategory = array();
}
return view('Report/Views/report/filereport', ['sessiondata' => $steponesession, 'sessiontwodata' => $steptwosession, 'category' => $category, 'subcategory' => $subcategory]);
} else {
if (Session::has('report.stepone')) {
$steponesession = Session::get('report.stepone');
return view('Report/Views/report/filereport', ['sessiondata' => $steponesession, 'category' => $category]);
} else {
return redirect('/filereport');
}
}
} else {
if ($step == 3) {
$objUser = new user();
$reportuser = $objUser->getReportUserInfo($userid);
if (Session::has('report.stepthree')) {
$stepthreesession = Session::get('report.stepthree');
return view('Report/Views/report/filereport', ['userdata' => $reportuser, 'stepthreesession' => $stepthreesession]);
} else {
if (Session::has('report.stepone') && Session::has('report.steptwo')) {
return view('Report/Views/report/filereport', ['userdata' => $reportuser]);
} else {
if (Session::has('report.stepone')) {
return redirect('/filereport?step=2');
} else {
return redirect('/filereport');
}
}
}
} else {
if ($step == 4) {
if (Session::has('report.stepone') && Session::has('report.steptwo') && Session::has('report.stepthree')) {
if (Session::has('report.id')) {
$reportid = Session::get('report.id');
} else {
return redirect('/filereport');
//.........这里部分代码省略.........