Explorar o código

Update Status model

Daniel Supernault %!s(int64=7) %!d(string=hai) anos
pai
achega
4b0939cbfb
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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();
     }