Explorar o código

Update Status model

Daniel Supernault %!s(int64=7) %!d(string=hai) anos
pai
achega
2726f90584
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      app/Status.php

+ 3 - 0
app/Status.php

@@ -25,6 +25,9 @@ class Status extends Model
 
     public function thumb()
     {
+      if($this->media->count() == 0) {
+        return "data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==";
+      }
       return url(Storage::url($this->firstMedia()->thumbnail_path));
     }