Example #1
0
 public function anyIndex()
 {
     $user_id = NULL;
     if (User::check()) {
         $user_id = User::get()->id;
     }
     $website_views = new WebsiteViews();
     $website_views->user_id = $user_id;
     $website_views->save();
     return View::make('home.home');
 }
 public function anyDashboard()
 {
     $website_views = WebsiteViews::all();
     $total_pending = Bookings::where('pending', 1)->count();
     $total_consulted = Bookings::where('consulted', 1)->count();
     $total_completed = Bookings::where('completed', 1)->count();
     $total_cancelled = Bookings::where('cancelled', 1)->count();
     $total_service_sales = 0;
     $total_shop_sales = 0;
     return View::make('dashboard.dashboard', ['website_views' => $website_views->count(), 'total_pending' => $total_pending, 'total_consulted' => $total_consulted, 'total_completed' => $total_completed, 'total_cancelled' => $total_cancelled, 'total_service_sales' => $total_service_sales, 'total_shop_sales' => $total_shop_sales]);
 }