|
@@ -128,6 +128,7 @@ class DistAdminDistributor extends EloquentRepository
|
|
|
'post_date' => Carbon::now(),
|
|
|
'created_at'=>Carbon::now(),
|
|
|
'updated_at'=>Carbon::now(),
|
|
|
+ 'page_type' => 0,
|
|
|
]);
|
|
|
//生成绑定关系
|
|
|
$sitePagesTagRelationship = new SitePagesTagRelationship();
|
|
@@ -147,6 +148,8 @@ class DistAdminDistributor extends EloquentRepository
|
|
|
'post_date' => Carbon::now(),
|
|
|
'created_at'=>Carbon::now(),
|
|
|
'updated_at'=>Carbon::now(),
|
|
|
+ 'page_type' => 1,
|
|
|
+ 'template_file' => config('dictionary.landing_page_default_template')
|
|
|
]);
|
|
|
//生成privacy
|
|
|
$privacy = $sitePages->create([
|
|
@@ -160,6 +163,8 @@ class DistAdminDistributor extends EloquentRepository
|
|
|
'post_date' => Carbon::now(),
|
|
|
'created_at'=>Carbon::now(),
|
|
|
'updated_at'=>Carbon::now(),
|
|
|
+ 'page_type' => 1,
|
|
|
+ 'template_file' => config('dictionary.landing_page_default_template')
|
|
|
]);
|
|
|
//生成sales
|
|
|
$sales = $sitePages->create([
|
|
@@ -173,6 +178,8 @@ class DistAdminDistributor extends EloquentRepository
|
|
|
'post_date' => Carbon::now(),
|
|
|
'created_at'=>Carbon::now(),
|
|
|
'updated_at'=>Carbon::now(),
|
|
|
+ 'page_type' => 1,
|
|
|
+ 'template_file' => config('dictionary.landing_page_default_template')
|
|
|
]);
|
|
|
//生成service
|
|
|
$service = $sitePages->create([
|
|
@@ -186,6 +193,8 @@ class DistAdminDistributor extends EloquentRepository
|
|
|
'post_date' => Carbon::now(),
|
|
|
'created_at'=>Carbon::now(),
|
|
|
'updated_at'=>Carbon::now(),
|
|
|
+ 'page_type' => 1,
|
|
|
+ 'template_file' => config('dictionary.landing_page_default_template')
|
|
|
]);
|
|
|
//生成faqs
|
|
|
$faqs = $sitePages->create([
|
|
@@ -199,6 +208,23 @@ class DistAdminDistributor extends EloquentRepository
|
|
|
'post_date' => Carbon::now(),
|
|
|
'created_at'=>Carbon::now(),
|
|
|
'updated_at'=>Carbon::now(),
|
|
|
+ 'page_type' => 1,
|
|
|
+ 'template_file' => config('dictionary.landing_page_default_template')
|
|
|
+ ]);
|
|
|
+ //生成contact
|
|
|
+ $contact = $sitePages->create([
|
|
|
+ 'title' => 'Contact us',
|
|
|
+ 'status' => 1,
|
|
|
+ 'author' => 'admin',
|
|
|
+ 'dist_id'=>$distId,
|
|
|
+ 'content' => 'Default Content',
|
|
|
+ 'slug' => 'contact-us',
|
|
|
+ 'seo_title' => 'Contact us',
|
|
|
+ 'post_date' => Carbon::now(),
|
|
|
+ 'created_at'=>Carbon::now(),
|
|
|
+ 'updated_at'=>Carbon::now(),
|
|
|
+ 'page_type' => 1,
|
|
|
+ 'template_file' => config('dictionary.landing_page_contact_us_template')
|
|
|
]);
|
|
|
//生成菜单
|
|
|
$siteMenu = new SiteMenu();
|
|
@@ -209,7 +235,7 @@ class DistAdminDistributor extends EloquentRepository
|
|
|
'product' => '',
|
|
|
'pages' => '',
|
|
|
'url' => '',
|
|
|
- 'unique_page' => '',
|
|
|
+ 'landing_page' => '',
|
|
|
];
|
|
|
/*
|
|
|
* ==========================================
|
|
@@ -272,8 +298,8 @@ class DistAdminDistributor extends EloquentRepository
|
|
|
];
|
|
|
//----------------About Us------------------
|
|
|
$newMenuConfig = $menuConfig;
|
|
|
- $newMenuConfig['pages'] = $aboutUs->id;
|
|
|
- $menuType = 3;//pages
|
|
|
+ $newMenuConfig['landing_page'] = $aboutUs->id;
|
|
|
+ $menuType = 4;//pages
|
|
|
$data[5] = [
|
|
|
'parentId' => 0,
|
|
|
'title' => 'About Us',
|
|
@@ -285,7 +311,7 @@ class DistAdminDistributor extends EloquentRepository
|
|
|
];
|
|
|
//----------------Contact------------------
|
|
|
$newMenuConfig = $menuConfig;
|
|
|
- $newMenuConfig['unique_page'] = 'contact';
|
|
|
+ $newMenuConfig['landing_page'] = $contact->id;
|
|
|
$menuType = 4;//pages
|
|
|
$data[6] = [
|
|
|
'parentId' => 0,
|
|
@@ -318,8 +344,8 @@ class DistAdminDistributor extends EloquentRepository
|
|
|
];
|
|
|
//----------------FAQ------------------
|
|
|
$newMenuConfig = $menuConfig;
|
|
|
- $newMenuConfig['pages'] = $faqs->id;
|
|
|
- $menuType = 3;//pages
|
|
|
+ $newMenuConfig['landing_page'] = $faqs->id;
|
|
|
+ $menuType = 4;//pages
|
|
|
$data[2] = [
|
|
|
'parentId' => 1,
|
|
|
'title' => 'FAQ',
|
|
@@ -331,8 +357,8 @@ class DistAdminDistributor extends EloquentRepository
|
|
|
];
|
|
|
//----------------Sales------------------
|
|
|
$newMenuConfig = $menuConfig;
|
|
|
- $newMenuConfig['pages'] = $sales->id;
|
|
|
- $menuType = 3;//pages
|
|
|
+ $newMenuConfig['landing_page'] = $sales->id;
|
|
|
+ $menuType = 4;//pages
|
|
|
$data[3] = [
|
|
|
'parentId' => 1,
|
|
|
'title' => 'Sales',
|
|
@@ -371,8 +397,8 @@ class DistAdminDistributor extends EloquentRepository
|
|
|
|
|
|
//----------------About Us------------------
|
|
|
$newMenuConfig = $menuConfig;
|
|
|
- $newMenuConfig['pages'] = $aboutUs->id;
|
|
|
- $menuType = 3;//pages
|
|
|
+ $newMenuConfig['landing_page'] = $aboutUs->id;
|
|
|
+ $menuType = 4;//pages
|
|
|
$data[6] = [
|
|
|
'parentId' => 4,
|
|
|
'title' => 'About Us',
|
|
@@ -384,8 +410,8 @@ class DistAdminDistributor extends EloquentRepository
|
|
|
];
|
|
|
//----------------Services------------------
|
|
|
$newMenuConfig = $menuConfig;
|
|
|
- $newMenuConfig['pages'] = $service->id;
|
|
|
- $menuType = 3;//pages
|
|
|
+ $newMenuConfig['landing_page'] = $service->id;
|
|
|
+ $menuType = 4;//pages
|
|
|
$data[7] = [
|
|
|
'parentId' => 4,
|
|
|
'title' => 'Services',
|
|
@@ -412,7 +438,7 @@ class DistAdminDistributor extends EloquentRepository
|
|
|
];
|
|
|
//----------------Contact------------------
|
|
|
$newMenuConfig = $menuConfig;
|
|
|
- $newMenuConfig['unique_page'] = 'contact';
|
|
|
+ $newMenuConfig['landing_page'] = $contact->id;
|
|
|
$menuType = 4;//pages
|
|
|
$data[9] = [
|
|
|
'parentId' => 4,
|