Пример #1
0
 public function dashboard(Request $request)
 {
     $this->data['user'] = $request->user();
     $this->data['teams'] = Team::with('points')->get();
     $this->data['players'] = User::with(['points', 'team'])->get();
     $this->data['challenges'] = \App\Challenge::where('active_time', '<', date('Y-m-d H:i:s'))->get();
     return View::make('team.dashboard', $this->data);
 }
Пример #2
0
 public function dashboard(Request $request)
 {
     $this->data['teams'] = \App\Team::with('points')->get();
     $this->data['roles'] = \App\Role::get();
     $this->data['adminUser'] = \App\User::find(1);
     $this->data['users'] = \App\User::where('id', '>', 1)->with('points')->get()->sortByDesc('amount');
     return View::make('admin.dashboard', $this->data);
 }