本文整理匯總了PHP中Customers::getCustomertodaysRegCount方法的典型用法代碼示例。如果您正苦於以下問題:PHP Customers::getCustomertodaysRegCount方法的具體用法?PHP Customers::getCustomertodaysRegCount怎麽用?PHP Customers::getCustomertodaysRegCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Customers
的用法示例。
在下文中一共展示了Customers::getCustomertodaysRegCount方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
if (Auth::check()) {
$currentPage = "";
$mainMenu = "DASHBOARD";
//customers or Inquiries
$todaysCustomerReg = Customers::getCustomertodaysRegCount();
$customerCount = Customers::getCustomerCount();
//Members or Family Members
$todaysMemberReg = CustomerMembership::getMembertodaysRegCount();
$membersCount = CustomerMembership::getMemberCount();
//Non Members or prospects
$todaysNonmemberReg = CustomerMembership::getNonMembertodaysRegCount();
$NonmembersCount = CustomerMembership::getNonMemberCount();
//Enrolled customers(kids)
$todaysEnrolledCustomers = StudentClasses::getTodaysEnrolledCustomers();
$enrolledCustomers = StudentClasses::getEnrolledCustomers();
//for followups
$reminderCount = Comments::getReminderCountByFranchiseeId();
//Introvisit
$totalIntrovisitCount = IntroVisit::getIntrovistCount();
$introVisitCount = IntroVisit::getIntrovisitBytoday();
$allIntrovisits = IntroVisit::getAllActiveIntrovisit();
for ($i = 0; $i < count($allIntrovisits); $i++) {
$data = Comments::where('introvisit_id', '=', $allIntrovisits[$i]['id'])->orderBy('id', 'DESC')->first();
if (isset($data)) {
$allIntrovisits[$i]['followup_status'] = $data['followup_status'];
}
}
//for courses
$totalParentchildCourse = Classes::getallParentchildCourseCount();
$totalPrekgKindergarten = Classes::getallPrekgKindergartenCount();
$totalGradeschool = Classes::getallGradeschoolCount();
$totalCourses = $totalParentchildCourse + $totalPrekgKindergarten + $totalGradeschool;
//for birthdayparty
$totalbpartyCount = BirthdayParties::getBpartyCount();
$todaysbpartycount = BirthdayParties::getBpartyCountBytoday();
$todaysFollowup = Comments::getAllFollowup();
$todaysIntrovisit = BatchSchedule::getTodaysIntroVisits();
$activeRemindersCount = Comments::getAllFollowupActive();
//get birthday dates
$startdate = new carbon();
$startdate->startOfYear();
$endofyear = new carbon();
$endofyear = $endofyear->endOfYear();
$student_id = array();
$birthday_celebration_data = BirthdayParties::where('created_at', '>=', $startdate->toDateString())->where('created_at', '<=', $endofyear->toDateString())->select('student_id')->get();
//var_dump($birthday_celebration_data); die();
for ($i = 0; $i < count($birthday_celebration_data); $i++) {
$student_id[$i] = $birthday_celebration_data[$i]['student_id'];
}
$dat = new carbon();
$month = $dat->month;
$presentdate = $dat->day;
// for rest of the days of month
$birthday_data = Students::whereNotIn('id', $student_id)->where('student_date_of_birth', '<>', '')->where(DB::raw('MONTH(student_date_of_birth)'), '=', $month)->where(DB::raw('DATE(student_date_of_birth)'), '>', $presentdate)->where('franchisee_id', '=', Session::get('franchiseId'))->orderBy(DB::raw('DAY(student_date_of_birth)'))->get();
// echo $month; die();
for ($i = 0; $i < count($birthday_data); $i++) {
$customer_data = Customers::where('id', '=', $birthday_data[$i]['customer_id'])->get();
$birthday_data[$i]['customer_name'] = $customer_data[0]['customer_name'];
$birthday_data[$i]['mobile_no'] = $customer_data[0]['mobile_no'];
$birthday_data[$i]['membership'] = CustomerMembership::where('customer_id', '=', $birthday_data[$i]['customer_id'])->count();
}
$m = $month;
$m++;
while ($m <= 12) {
$birthday_data_month[] = Students::whereNotIn('id', $student_id)->where('student_date_of_birth', '<>', '')->where(DB::raw('MONTH(student_date_of_birth)'), '=', $m)->where('franchisee_id', '=', Session::get('franchiseId'))->orderBy(DB::raw('DAY(student_date_of_birth)'))->get();
$m++;
}
// for starting months
$m = 1;
while ($m < $month) {
$birthday_data_month[] = Students::whereNotIn('id', $student_id)->where('student_date_of_birth', '<>', '')->where(DB::raw('MONTH(student_date_of_birth)'), '=', $m)->where('franchisee_id', '=', Session::get('franchiseId'))->orderBy(DB::raw('DAY(student_date_of_birth)'))->get();
$m++;
}
for ($i = 0; $i < count($birthday_data_month); $i++) {
for ($j = 0; $j < count($birthday_data_month[$i]); $j++) {
$customer_data = Customers::where('id', '=', $birthday_data_month[$i][$j]['customer_id'])->get();
$birthday_data_month[$i][$j]['customer_name'] = $customer_data[0]['customer_name'];
$birthday_data_month[$i][$j]['mobile_no'] = $customer_data[0]['mobile_no'];
$birthday_data_month[$i][$j]['membership'] = CustomerMembership::where('customer_id', '=', $birthday_data_month[$i][$j]['customer_id'])->count();
}
}
// var_dump($birthday_data_month);exit();
//for starting days of present month
$birthday_month_startdays = Students::whereNotIn('id', $student_id)->where('student_date_of_birth', '<>', '')->where(DB::raw('MONTH(student_date_of_birth)'), '=', $month)->where(DB::raw('DATE(student_date_of_birth)'), '<', $presentdate)->where('franchisee_id', '=', Session::get('franchiseId'))->orderBy(DB::raw('DAY(student_date_of_birth)'))->get();
for ($i = 0; $i < count($birthday_month_startdays); $i++) {
$customer_data = Customers::where('id', '=', $birthday_month_startdays[$i]['customer_id'])->get();
$birthday_month_startdays[$i]['customer_name'] = $customer_data[0]['customer_name'];
$birthday_month_startdays[$i]['mobile_no'] = $customer_data[0]['mobile_no'];
$birthday_month_startdays[$i]['membership'] = CustomerMembership::where('customer_id', '=', $birthday_month_startdays[$i]['customer_id'])->count();
}
//for birthday celebration this week
$presentdate = new carbon();
$weeekdate = new carbon();
//.........這裏部分代碼省略.........