Explorar el Código

Update Status model

Daniel Supernault hace 7 años
padre
commit
4b0939cbfb
Se han modificado 1 ficheros con 3 adiciones y 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();
     }