Exemple #1
0
 public function getRanking($iso = false)
 {
     $this->user->pushCriteria(new OrderBy('points'));
     if (!$iso) {
         $users = $this->user->all()->take(32);
         $title = trans('user::ui.ranking.global');
     } else {
         $country = $this->country->findByField('iso2', $iso)->first();
         $users = $this->user->findWhere(['country_id' => $country->id]);
         $title = trans('user::ui.ranking.country', ['country' => $country->short_name]);
     }
     return theme('user.learning.ranking', compact('users', 'title'));
 }
Exemple #2
0
 public function compose($view)
 {
     $this->user->pushCriteria(new UserOrderCriteria());
     $view->users = $this->user->all();
 }
Exemple #3
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $this->user->pushCriteria(new UserOrderCriteria());
     $users = $this->user->all();
     return view('user::backend.users.index', compact('users', 'currentUser'));
 }