public function addUserSpotActivityTypeID()
 {
     $spotId = Session::get('spot_id');
     $activityId = Session::get('activity_id');
     $typeId = Session::get('type_id');
     $userID = Auth::User()->id;
     $exhibitionevents = ExhibitionEvent::all();
     $users = User::all();
     $booths = Booth::all();
     $systemtracks = Systemtrack::where('type', 'booth')->get();
     $systemtrack_users = DB::table('systemtracks')->where('systemtracks.type', 'booth')->join('users', 'users.id', '=', 'systemtracks.user_id')->get();
     return view('AdminCP.reports.systemtracks.booth', compact('booths', 'systemtracks', 'users', 'exhibitionevents', 'systemtrack_users'));
     DB::table('systemtracks')->insert(['user_id' => $userID, 'spot_id' => $spotId, 'activity_id' => '*****@*****.**', 'type_id' => 0]);
 }
 public function boothsreport()
 {
     $exhibitionevents = ExhibitionEvent::all();
     $booths = Booth::all();
     $i = 0;
     foreach ($booths as $booth) {
         $data = $booth->name;
         //$allvisitors[$i]=Systemtrack::where('do','LIKE', "%$data%")->count();
         $allvisitors[$i] = Systemtrack::where('type', 'booth')->where('type_id', $booth->id)->count();
         $uniquevisit[$i] = Systemtrack::where('type', 'booth')->where('type_id', $booth->id)->distinct('user_id')->count('user_id');
         $i++;
     }
     return view('AdminCP.reports.booths.boothreport', compact('exhibitionevents', 'booths', 'allvisitors', 'uniquevisit'));
 }
 public function booth()
 {
     if (!$this->adminAuth()) {
         return view('errors.404');
     }
     $exhibitionevents = ExhibitionEvent::all();
     $users = User::all();
     $booths = Booth::all();
     $systemtracks = Systemtrack::where('type', 'booth')->get();
     $systemtrack_users = DB::table('systemtracks')->where('systemtracks.type', 'booth')->join('users', 'users.id', '=', 'systemtracks.user_id')->get();
     return view('AdminCP.reports.systemtracks.booth', compact('booths', 'systemtracks', 'users', 'exhibitionevents', 'systemtrack_users'));
 }