Daniel Supernault пре 7 година
родитељ
комит
f5fdfcf40c
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      app/Http/Controllers/ProfileController.php

+ 2 - 1
app/Http/Controllers/ProfileController.php

@@ -109,11 +109,12 @@ class ProfileController extends Controller
         abort(403);
       }
       $user = Auth::user()->profile;
+      $settings = User::whereUsername($username)->firstOrFail()->settings;
       $owner = true;
       $following = false;
       $timeline = $user->bookmarks()->withCount(['likes','comments'])->orderBy('created_at','desc')->simplePaginate(10);
       $is_following = ($owner == false && Auth::check()) ? $user->followedBy(Auth::user()->profile) : false;
       $is_admin = is_null($user->domain) ? $user->user->is_admin : false;
-      return view('profile.show', compact('user', 'owner', 'following', 'timeline', 'is_following', 'is_admin'));
+      return view('profile.show', compact('user', 'settings', 'owner', 'following', 'timeline', 'is_following', 'is_admin'));
     }
 }