public function show($uid)
 {
     $userprofile = User::find($uid);
     //dd($userprofile);
     $usertopic = Topic::where('user_id', '=', $uid)->get();
     $userfavorite = Favorite::where('user_id', '=', $uid)->get();
     return view('users.ucenter', compact('userprofile', 'usertopic', 'userfavorite'));
 }
Пример #2
0
 public function __construct()
 {
     view()->share('menu', Node::getMenu());
     view()->share('currentUser', Auth::user());
     //print_r(Auth::user());
     if (Auth::user()) {
         view()->share('currentUserProfile', User::find(Auth::user()->user_id));
     }
 }
 public function find($id)
 {
     return User::find($id);
 }