/**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $user = User::where('id', $id)->first();
     $user = controller::user_humanized($user);
     $types = Types::whereNotIn('id', [5, 99])->get();
     return view('user.show', ['user' => $user, 'types' => $types]);
 }
Example #2
0
 public function checkForDeviceIsListed()
 {
     $getUsersDeviceTyp = $this->detectDevice();
     $deviceDatabase = Types::where('platform', $getUsersDeviceTyp)->get();
     $sendData = array();
     if (isset($deviceDatabase->lists('id')[0])) {
         $sendData['platform'] = $deviceDatabase->lists('platform')[0];
         $sendData['id'] = $deviceDatabase->lists('id')[0];
     } else {
         $sendData['platform'] = '';
         $sendData['id'] = '';
     }
     return $sendData;
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $type = Types::where('type', $id)->first();
     $types = Types::whereNotIn('id', [5, 99])->get();
     foreach ($type->users as $user) {
         $user = controller::user_humanized($user);
         $user->etoileCode = controller::user_stars($user->etoiles);
     }
     if ($id == "honneur") {
         $users = User::where('honneur', '1')->orderBy('ordre', 'desc')->orderBy('anbapt', 'desc')->get();
         foreach ($users as $user) {
             $user = controller::user_humanized($user);
             $user->etoileCode = controller::user_stars($user->etoiles);
         }
         return view('comite.show', ['type' => $type, 'users' => $users, 'types' => $types]);
     } else {
         return view('comite.show', ['type' => $type, 'types' => $types]);
     }
 }
 public function comite()
 {
     $types = Types::whereNotIn('id', [5, 99])->get();
     return view('page/comite', ['types' => $types]);
 }