Ver Fonte

Wesmiler

wesmiler há 21 horas atrás
pai
commit
b601b9c02a
1 ficheiros alterados com 5 adições e 0 exclusões
  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') : '';