1
0
Daniel Supernault 7 жил өмнө
parent
commit
2726f90584
1 өөрчлөгдсөн 3 нэмэгдсэн , 0 устгасан
  1. 3 0
      app/Status.php

+ 3 - 0
app/Status.php

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