wesmiler 21 giờ trước cách đây
mục cha
commit
b601b9c02a
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  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') : '';