wesmiler 1 gün önce
ebeveyn
işleme
2fc3d7276c
1 değiştirilmiş dosya ile 11 ekleme ve 0 silme
  1. 11 0
      app/Models/GoodsCommentModel.php

+ 11 - 0
app/Models/GoodsCommentModel.php

@@ -31,6 +31,17 @@ class GoodsCommentModel extends BaseModel
     }
 
     /**
+     * 图册
+     * @param $value
+     * @return array|string
+     */
+    public function getAlbumsAttribute($value)
+    {
+        $value = $value? get_images_preview($value,'url',2) : [];
+        return $value;
+    }
+    
+    /**
      * 发布用户
      * @return \Illuminate\Database\Eloquent\Relations\HasOne
      */