Daniel Supernault преди 7 години
родител
ревизия
4b0939cbfb
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      app/Status.php

+ 3 - 0
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();
     }