Пример #1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $topics = \App\Topic::has('questions')->get();
     $user = \App\User::find($id);
     return view('users.show')->with(['topics' => $topics, 'user' => $user]);
 }
Пример #2
0
 /**
  * Show the application dashboard to the user.
  *
  * @return Response
  */
 public function index()
 {
     $topics = Topic::has('questions')->get();
     $user = \Auth::user();
     return view('home')->with(['topics' => $topics, 'user' => $user]);
 }