From f5fdfcf40cf0bb69592f1c2b2ae9de3ea7e999f3 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 5 Aug 2018 13:20:20 -0600 Subject: [PATCH] Update ProfileController --- app/Http/Controllers/ProfileController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 05299b1a..cfc589ba 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/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')); } }