Explorar el Código

Update Status model

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