CMS pages seeder implemented and now seeder generates all prebuilt pages that were listed in footer quicklinks
This commit is contained in:
parent
c856ef55ea
commit
b570bf229b
|
|
@ -9,6 +9,7 @@ use Webkul\Core\Database\Seeders\DatabaseSeeder as CoreSeeder;
|
|||
use Webkul\User\Database\Seeders\DatabaseSeeder as UserSeeder;
|
||||
use Webkul\Customer\Database\Seeders\DatabaseSeeder as CustomerSeeder;
|
||||
use Webkul\Inventory\Database\Seeders\DatabaseSeeder as InventorySeeder;
|
||||
use Webkul\CMS\Database\Seeders\DatabaseSeeder as CMSSeeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
|
|
@ -25,5 +26,6 @@ class DatabaseSeeder extends Seeder
|
|||
$this->call(AttributeSeeder::class);
|
||||
$this->call(UserSeeder::class);
|
||||
$this->call(CustomerSeeder::class);
|
||||
$this->call(CMSSeeder::class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\CMS\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use DB;
|
||||
|
||||
class CMSPagesTableSeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
DB::table('cms_pages')->delete();
|
||||
|
||||
DB::table('cms_pages')->insert([
|
||||
[
|
||||
'id' => '1',
|
||||
'url_key' => 'about-us',
|
||||
'html_content' => '<div class="static-container one-column">
|
||||
<div class="mb-5">About us page content</div>
|
||||
</div>',
|
||||
'page_title' => 'About Us',
|
||||
'meta_title' => 'about us',
|
||||
'meta_description' => '',
|
||||
'meta_keywords' => 'aboutus',
|
||||
'content' => '{"html": "<div class=\"static-container one-column\">\r\n<div class=\"mb-5\">About us page content</div>\r\n</div>",
|
||||
"meta_title": "about us",
|
||||
"page_title": "About Us",
|
||||
"meta_keywords": "aboutus ", "meta_description": ""}',
|
||||
'channel_id' => 1,
|
||||
'locale_id' => 1
|
||||
], [
|
||||
'id' => '2',
|
||||
'url_key' => 'return-policy',
|
||||
'html_content' => '<div class="static-container one-column">
|
||||
<div class="mb-5">Return policy page content</div>
|
||||
</div>',
|
||||
'page_title' => 'Return Policy',
|
||||
'meta_title' => 'return policy',
|
||||
'meta_description' => '',
|
||||
'meta_keywords' => 'return, policy',
|
||||
'content' => '{"html": "<div class=\"static-container one-column\">\r\n<div class=\"mb-5\">Return policy page content</div>\r\n</div>",
|
||||
"meta_title": "return policy",
|
||||
"page_title": "Return Policy",
|
||||
"meta_keywords": "return, policy ", "meta_description": ""}',
|
||||
'channel_id' => 1,
|
||||
'locale_id' => 1
|
||||
], [
|
||||
'id' => '3',
|
||||
'url_key' => 'refund-policy',
|
||||
'html_content' => '<div class="static-container one-column">
|
||||
<div class="mb-5">Refund policy page content</div>
|
||||
</div>',
|
||||
'page_title' => 'Refund Policy',
|
||||
'meta_title' => 'Refund policy',
|
||||
'meta_description' => '',
|
||||
'meta_keywords' => 'refund, policy',
|
||||
'content' => '{"html": "<div class=\"static-container one-column\">\r\n<div class=\"mb-5\">Refund policy page content</div>\r\n</div>",
|
||||
"meta_title": "Refund policy",
|
||||
"page_title": "Refund Policy",
|
||||
"meta_keywords": "refund,policy ", "meta_description": ""}',
|
||||
'channel_id' => 1,
|
||||
'locale_id' => 1
|
||||
], [
|
||||
'id' => '4',
|
||||
'url_key' => 'terms-conditions',
|
||||
'html_content' => '<div class="static-container one-column">
|
||||
<div class="mb-5">Terms & conditions page content</div>
|
||||
</div>',
|
||||
'page_title' => 'Terms & Conditions',
|
||||
'meta_title' => 'Terms & Conditions',
|
||||
'meta_description' => '',
|
||||
'meta_keywords' => 'term, conditions',
|
||||
'content' => '{"html": "<div class=\"static-container one-column\">\r\n<div class=\"mb-5\">Terms & conditions page content</div>\r\n</div>",
|
||||
"meta_title": "Terms & Conditions",
|
||||
"page_title": "Terms & Conditions",
|
||||
"meta_keywords": "terms, conditions ", "meta_description": ""}',
|
||||
'channel_id' => 1,
|
||||
'locale_id' => 1
|
||||
], [
|
||||
'id' => '5',
|
||||
'url_key' => 'terms-of-use',
|
||||
'html_content' => '<div class="static-container one-column">
|
||||
<div class="mb-5">Terms of use page content</div>
|
||||
</div>',
|
||||
'page_title' => 'Terms of use',
|
||||
'meta_title' => 'Terms of use',
|
||||
'meta_description' => '',
|
||||
'meta_keywords' => 'term, use',
|
||||
'content' => '{"html": "<div class=\"static-container one-column\">\r\n<div class=\"mb-5\">Terms of use page content</div>\r\n</div>",
|
||||
"meta_title": "Terms of use",
|
||||
"page_title": "Terms of use",
|
||||
"meta_keywords": "terms, use ", "meta_description": ""}',
|
||||
'channel_id' => 1,
|
||||
'locale_id' => 1
|
||||
], [
|
||||
'id' => '6',
|
||||
'url_key' => 'contact-us',
|
||||
'html_content' => '<div class="static-container one-column">
|
||||
<div class="mb-5">Contact us page content</div>
|
||||
</div>',
|
||||
'page_title' => 'Contact Us',
|
||||
'meta_title' => 'Contact Us',
|
||||
'meta_description' => '',
|
||||
'meta_keywords' => 'contact, us',
|
||||
'content' => '{"html": "<div class=\"static-container one-column\">\r\n<div class=\"mb-5\">Contact us page content</div>\r\n</div>",
|
||||
"meta_title": "Contact Us",
|
||||
"page_title": "Contact Us",
|
||||
"meta_keywords": "contact, us ", "meta_description": ""}',
|
||||
'channel_id' => 1,
|
||||
'locale_id' => 1
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\CMS\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$this->call(CMSPagesTableSeeder::class);
|
||||
}
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ class ChannelTableSeeder extends Seeder
|
|||
'name' => 'Default',
|
||||
'root_category_id' => 1,
|
||||
'home_page_content' => '<p>@include("shop::home.slider") @include("shop::home.featured-products") @include("shop::home.new-products")</p><div class="banner-container"><div class="left-banner"><img src="https://s3-ap-southeast-1.amazonaws.com/cdn.uvdesk.com/website/1/201902045c581f9494b8a1.png" /></div><div class="right-banner"><img src="https://s3-ap-southeast-1.amazonaws.com/cdn.uvdesk.com/website/1/201902045c581fb045cf02.png" /> <img src="https://s3-ap-southeast-1.amazonaws.com/cdn.uvdesk.com/website/1/201902045c581fc352d803.png" /></div></div>',
|
||||
'footer_content' => '<div class="list-container"><span class="list-heading">Quick Links</span><ul class="list-group"><li><a href="#">About Us</a></li><li><a href="#">Return Policy</a></li><li><a href="#">Refund Policy</a></li><li><a href="#">Terms and conditions</a></li><li><a href="#">Terms of Use</a></li><li><a href="#">Contact Us</a></li></ul></div><div class="list-container"><span class="list-heading">Connect With Us</span><ul class="list-group"><li><a href="#"><span class="icon icon-facebook"></span>Facebook </a></li><li><a href="#"><span class="icon icon-twitter"></span> Twitter </a></li><li><a href="#"><span class="icon icon-instagram"></span> Instagram </a></li><li><a href="#"> <span class="icon icon-google-plus"></span>Google+ </a></li><li><a href="#"> <span class="icon icon-linkedin"></span>LinkedIn </a></li></ul></div>',
|
||||
'footer_content' => '<div class="list-container"><span class="list-heading">Quick Links</span><ul class="list-group"><li><a href="@php echo route("shop.cms.page", "about-us") @endphp">About Us</a></li><li><a href="@php echo route("shop.cms.page", "return-policy") @endphp">Return Policy</a></li><li><a href="@php echo route("shop.cms.page", "refund-policy") @endphp">Refund Policy</a></li><li><a href="@php echo route("shop.cms.page", "terms-conditions") @endphp">Terms and conditions</a></li><li><a href="@php echo route("shop.cms.page", "terms-of-use") @endphp">Terms of Use</a></li><li><a href="@php echo route("shop.cms.page", "contact-us") @endphp">Contact Us</a></li></ul></div><div class="list-container"><span class="list-heading">Connect With Us</span><ul class="list-group"><li><a href="#"><span class="icon icon-facebook"></span>Facebook </a></li><li><a href="#"><span class="icon icon-twitter"></span> Twitter </a></li><li><a href="#"><span class="icon icon-instagram"></span> Instagram </a></li><li><a href="#"> <span class="icon icon-google-plus"></span>Google+ </a></li><li><a href="#"> <span class="icon icon-linkedin"></span>LinkedIn </a></li></ul></div>',
|
||||
'name' => 'Default',
|
||||
'default_locale_id' => 1,
|
||||
'base_currency_id' => 1
|
||||
|
|
@ -27,7 +27,7 @@ class ChannelTableSeeder extends Seeder
|
|||
'channel_id' => 1,
|
||||
'currency_id' => 1,
|
||||
]);
|
||||
|
||||
|
||||
DB::table('channel_locales')->insert([
|
||||
'channel_id' => 1,
|
||||
'locale_id' => 1,
|
||||
|
|
|
|||
Loading…
Reference in New Issue