wesmiler 2 miesięcy temu
rodzic
commit
dbb8a19ebc
1 zmienionych plików z 17 dodań i 1 usunięć
  1. 17 1
      app/Models/MeetingModel.php

+ 17 - 1
app/Models/MeetingModel.php

@@ -47,12 +47,28 @@ class MeetingModel extends BaseModel
     /**
      * @return array
      */
-    public function getCutyAttribute()
+    public function getCityAttribute()
     {
         return [$this->province_id,$this->city_id,$this->district_id];
     }
 
     /**
+     * @return array
+     */
+    public function getStoreIdsAttribute($value)
+    {
+        return $value? array_filter(explode(',', $value)):[];
+    }
+
+    /**
+     * @return array
+     */
+    public function setStoreIdsAttribute($value)
+    {
+        return $value? implode(',', $value).',' : '';
+    }
+
+    /**
      * 推荐组织人
      */
     public function member()