Update LikeController, fix likes_count bug

pull/2147/head
Daniel Supernault 5 years ago
parent b355b98a9f
commit 996866cbac
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -27,7 +27,7 @@ class LikeController extends Controller
$profile = $user->profile;
$status = Status::findOrFail($request->input('item'));
$count = $status->likes_count;
$count = $status->likes()->count();
if ($status->likes()->whereProfileId($profile->id)->count() !== 0) {
$like = Like::whereProfileId($profile->id)->whereStatusId($status->id)->firstOrFail();

Loading…
Cancel
Save