예제 #1
0
 /**
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function show(Request $request)
 {
     $questions = ProfileQuestion::join('profiles_answers', 'profiles_questions.id', '=', 'profiles_answers.profile_question_id')->where('profiles_answers.user_id', $request->id)->get();
     $user = User::with('achievements')->where('users.id', $request->id)->first();
     //$users = User::where('category_id', 2)->where('id', '<>', Auth::user()->id)->get();
     return view('members/show', ['user' => $user, 'questions' => $questions]);
 }
예제 #2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function about()
 {
     $questions = ProfileQuestion::join('profiles_answers', 'profiles_questions.id', '=', 'profiles_answers.profile_question_id')->where('profiles_answers.user_id', Auth::user()->id)->get();
     return view('profile.about', ['questions' => $questions]);
 }