fixed cms issue while including blade #5368

This commit is contained in:
mohd asif 2021-12-03 11:54:59 +05:30
parent c35817c3ad
commit adb830cab3
1 changed files with 6 additions and 0 deletions

View File

@ -35,6 +35,8 @@ class CmsRepository extends Repository
$data[$locale->code][$attribute] = $data[$attribute]; $data[$locale->code][$attribute] = $data[$attribute];
} }
} }
$data[$locale->code]['html_content'] = str_replace('=>', '=>', $data[$locale->code]['html_content']);
} }
$page = parent::create($data); $page = parent::create($data);
@ -58,6 +60,10 @@ class CmsRepository extends Repository
Event::dispatch('cms.pages.update.before', $id); Event::dispatch('cms.pages.update.before', $id);
$locale = isset($data['locale']) ? $data['locale'] : app()->getLocale();
$data[$locale]['html_content'] = str_replace('=>', '=>', $data[$locale]['html_content']);
parent::update($data, $id, $attribute); parent::update($data, $id, $attribute);
$page->channels()->sync($data['channels']); $page->channels()->sync($data['channels']);