This commit is contained in:
Daniel Supernault 2018-06-04 22:09:48 -06:00
parent 2a04281bdc
commit 4c7cf26c16
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ class StatusController extends Controller
{
$user = Profile::whereUsername($username)->firstOrFail();
$status = Status::whereProfileId($user->id)
->withCount('likes')
->withCount(['likes', 'comments'])
->findOrFail($id);
if(!$status->media_path && $status->in_reply_to_id) {
return redirect($status->url());

View file

@ -1,4 +1,4 @@
@extends('layouts.app',['title' => $user->username . " posted a photo: " . $status->likes()->count() . " likes, " . $status->comments()->count() . " comments" ])
@extends('layouts.app',['title' => $user->username . " posted a photo: " . $status->likes_count . " likes, " . $status->comments_count . " comments" ])
@section('content')