Custom database seeder
This commit is contained in:
parent
915d0933ff
commit
8d1dfe363a
|
|
@ -16,7 +16,7 @@ class DatabaseSeeder extends Seeder
|
|||
*/
|
||||
public function run()
|
||||
{
|
||||
// $this->call(BagistoDatabaseSeeder::class);
|
||||
$this->call(BagistoDatabaseSeeder::class);
|
||||
// $this->call(VelocityMetaDataSeeder::class);
|
||||
$this->call(SargaDatabaseSeeder::class);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,118 @@ class ChannelTableSeeder extends Seeder
|
|||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('channels')->insert([
|
||||
'id' => 2,
|
||||
'code' => 'test',
|
||||
'theme' => 'default',
|
||||
'hostname' => config('app.url').'/test',
|
||||
'root_category_id' => 2,
|
||||
'default_locale_id' => 1,
|
||||
'base_currency_id' => 1,
|
||||
]);
|
||||
DB::table('channel_translations')->insert([
|
||||
[
|
||||
'id' => 6,
|
||||
'channel_id' => 2,
|
||||
'locale' => 'en',
|
||||
'name' => 'Test',
|
||||
'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='.asset("/themes/default/assets/images/1.webp").' data-src='.asset("/themes/default/assets/images/1.webp").' class="lazyload" alt="test" width="720" height="720" />
|
||||
</div>
|
||||
<div class="right-banner">
|
||||
<img src='. asset("/themes/default/assets/images/2.webp").' data-src='. asset("/themes/default/assets/images/2.webp").' class="lazyload" alt="test" width="460" height="330" />
|
||||
<img src='.asset("/themes/default/assets/images/3.webp").' data-src='.asset("/themes/default/assets/images/3.webp").' class="lazyload" alt="test" width="460" height="330" />
|
||||
</div>
|
||||
</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>
|
||||
',
|
||||
'home_seo' => '{"meta_title": "Demo store", "meta_keywords": "Demo store meta keyword", "meta_description": "Demo store meta description"}',
|
||||
], [
|
||||
'id' => 7,
|
||||
'channel_id' => 2,
|
||||
'locale' => 'tr',
|
||||
'name' => 'Test',
|
||||
'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='.asset("/themes/default/assets/images/1.webp").' data-src='.asset("/themes/default/assets/images/1.webp").' class="lazyload" alt="test" width="720" height="720" />
|
||||
</div>
|
||||
<div class="right-banner">
|
||||
<img src='. asset("/themes/default/assets/images/2.webp").' data-src='. asset("/themes/default/assets/images/2.webp").' class="lazyload" alt="test" width="460" height="330" />
|
||||
<img src='.asset("/themes/default/assets/images/3.webp").' data-src='.asset("/themes/default/assets/images/3.webp").' class="lazyload" alt="test" width="460" height="330" />
|
||||
</div>
|
||||
</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>
|
||||
',
|
||||
'home_seo' => '{"meta_title": "Demo store", "meta_keywords": "Demo store meta keyword", "meta_description": "Demo store meta description"}',
|
||||
]
|
||||
]);
|
||||
|
||||
DB::table('channel_currencies')->insert([[
|
||||
'channel_id' => 2,
|
||||
'currency_id' => 3,
|
||||
],[
|
||||
'channel_id' => 2,
|
||||
'currency_id' => 4,
|
||||
]]);
|
||||
|
||||
DB::table('channel_locales')->insert([[
|
||||
'channel_id' => 2,
|
||||
'locale_id' => 6,
|
||||
],[
|
||||
'channel_id' => 2,
|
||||
'locale_id' => 7,
|
||||
]]);
|
||||
|
||||
DB::table('channel_inventory_sources')->insert([
|
||||
'channel_id' => 2,
|
||||
'inventory_source_id' => 1,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -14,7 +14,8 @@ class DatabaseSeeder extends Seeder
|
|||
public function run()
|
||||
{
|
||||
$this->call(SLocalesTableSeeder::class);
|
||||
$this->call(DemoCategoryTableSeeder::class);
|
||||
$this->call(SCurrencyTableSeeder::class);
|
||||
// $this->call(DemoCategoryTableSeeder::class);
|
||||
$this->call(ChannelTableSeeder::class);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue