|
@@ -421,7 +421,7 @@ class CmsContentTemplateSetRepository {
|
|
|
|
|
|
public function getTemplate($cityId)
|
|
|
{
|
|
|
- $group = $this->cmsContentTemplate->select('id','status','title','apply_type')->where(['city_id'=>$cityId,'deleted_at'=>null,'apply_type'=>0])->get();//->orderBy('apply_type','asc')
|
|
|
+ $group = $this->cmsContentTemplate->select('id','status','title','apply_type')->where(['city_id'=>$cityId,'deleted_at'=>null,'apply_type'=>0])->get();
|
|
|
$groups = $group->toArray();
|
|
|
if (count($groups)>1){
|
|
|
foreach($groups as $key => $val) {
|
|
@@ -430,7 +430,7 @@ class CmsContentTemplateSetRepository {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $market = $this->cmsContentTemplate->select('id','status','title','apply_type')->where(['city_id'=>$cityId,'deleted_at'=>null,'apply_type'=>1])->get();//->orderBy('apply_type','asc')
|
|
|
+ $market = $this->cmsContentTemplate->select('id','status','title','apply_type')->where(['city_id'=>$cityId,'deleted_at'=>null,'apply_type'=>1])->get();
|
|
|
$markets = $market->toArray();
|
|
|
if (count($markets)>1){
|
|
|
foreach($markets as $key => $val) {
|
|
@@ -439,8 +439,7 @@ class CmsContentTemplateSetRepository {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $templates = array_merge($groups,$markets);
|
|
|
-
|
|
|
+ $templates['cms_content_templates'] = array_merge($groups,$markets);
|
|
|
return $templates;
|
|
|
}
|
|
|
|