From 4b0939cbfb6838937b7c1ba12ce9f4e2ef37abdc Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 10 Aug 2018 01:06:05 -0600 Subject: [PATCH] Update Status model --- app/Status.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Status.php b/app/Status.php index 5deb69951..abb1c4bba 100644 --- a/app/Status.php +++ b/app/Status.php @@ -92,6 +92,9 @@ class Status extends Model public function bookmarked() { + if(!Auth::check()) { + return 0; + } $profile = Auth::user()->profile; return Bookmark::whereProfileId($profile->id)->whereStatusId($this->id)->count(); }