wesmiler 23 hodín pred
rodič
commit
b601b9c02a
1 zmenil súbory, kde vykonal 5 pridanie a 0 odobranie
  1. 5 0
      app/Models/PostRecordModel.php

+ 5 - 0
app/Models/PostRecordModel.php

@@ -25,6 +25,11 @@ class PostRecordModel extends BaseModel
 
     protected $appends = ['time_text'];
 
+    public function getAlbumsAttribute($value)
+    {
+        return $value? get_images_preview($value) : [];
+    }
+
     public function getTimeTextAttribute()
     {
         return $this->create_time? dateFormat($this->create_time,'Y-m-d') : '';