wesmiler před 2 měsíci
rodič
revize
a1a074957b
1 změnil soubory, kde provedl 8 přidání a 1 odebrání
  1. 8 1
      app/Models/MeetingModel.php

+ 8 - 1
app/Models/MeetingModel.php

@@ -22,7 +22,7 @@ class MeetingModel extends BaseModel
     // 设置数据表
     protected $table = 'meetings';
 
-    protected $appends = ['time_text'];
+    protected $appends = ['city','time_text'];
 
     public function getThumbAttribute($value)
     {
@@ -42,7 +42,14 @@ class MeetingModel extends BaseModel
 
         $endAt = date($formatType,$endTime);
         return $startAt.' - '.$endAt;
+    }
 
+    /**
+     * @return array
+     */
+    public function getCutyAttribute()
+    {
+        return [$this->province_id,$this->city_id,$this->district_id];
     }
 
     /**