Răsfoiți Sursa

Update ProfileController

Daniel Supernault 7 ani în urmă
părinte
comite
dfbcb0ae24
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      app/Http/Controllers/ProfileController.php

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

@@ -31,7 +31,7 @@ class ProfileController extends Controller
 
       // TODO: refactor this mess
       $owner = Auth::check() && Auth::id() === $user->user_id;
-      $following = ($owner == false && Auth::check()) ? $user->followedBy(Auth::user()->profile) : false;
+      $is_following = ($owner == false && Auth::check()) ? $user->followedBy(Auth::user()->profile) : false;
       $timeline = $user->statuses()
                   ->whereHas('media')
                   ->whereNull('in_reply_to_id')
@@ -39,7 +39,7 @@ class ProfileController extends Controller
                   ->withCount(['comments', 'likes'])
                   ->simplePaginate(21);
 
-      return view('profile.show', compact('user', 'owner', 'following', 'timeline'));
+      return view('profile.show', compact('user', 'owner', 'is_following', 'timeline'));
     }
 
     public function showActivityPub(Request $request, $user)