Ejemplo n.º 1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $clan = ClanData::select('ClanData.ClanID', 'ClanData.ClanName', 'ClanData.ClanTag', 'ClanData.OwnerCustomerID', 'ClanData.OwnerCharID', 'UsersChars.GamerTag', 'ClanData.MaxClanMembers', 'ClanData.NumClanMembers', 'ClanData.ClanLore', 'ClanCreateDate')->where('ClanData.ClanID', '=', $id)->join('UsersChars', 'ClanData.OwnerCharID', '=', 'UsersChars.CharID')->first();
     $users = UsersChars::where('ClanID', '=', $id)->get();
     //dd($users);
     return view('clansView', compact('users', 'clan'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //dd(Auth::check());
     //if (Session::has('user_id')) {
     $accountCount = Accounts::count();
     $serials = 0;
     $globalInventory = UsersInventory::count();
     $bannedCount = UsersData::where('AccountStatus', '>=', '200')->count();
     $clanCount = ClanData::count();
     $zDollarCount = UsersData::sum('GameDollars');
     $charactersCount = UsersChars::count();
     return view('dashboard')->with(['accountCount' => $accountCount, 'serials' => $serials, 'globalInventory' => $globalInventory, 'bannedCount' => $bannedCount, 'clanCount' => $clanCount, 'zDollarCount' => $zDollarCount, 'charactersCount' => $charactersCount]);
     //}
     //else return redirect('login');
 }