Merge pull request #477 from jitendra-webkul/jitendra

Category seeder added
This commit is contained in:
JItendra Singh 2019-01-21 14:37:38 +05:30 committed by GitHub
commit 85fbb95c45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 14 deletions

View File

@ -3,6 +3,7 @@
namespace Webkul\Admin\Database\Seeders;
use Illuminate\Database\Seeder;
use Webkul\Category\Database\Seeders\DatabaseSeeder as CategorySeeder;
use Webkul\Attribute\Database\Seeders\DatabaseSeeder as AttributeSeeder;
use Webkul\Core\Database\Seeders\DatabaseSeeder as CoreSeeder;
use Webkul\User\Database\Seeders\DatabaseSeeder as UserSeeder;
@ -21,6 +22,7 @@ class DatabaseSeeder extends Seeder
$this->call(CoreSeeder::class);
$this->call(InventorySeeder::class);
$this->call(AttributeSeeder::class);
$this->call(CategorySeeder::class);
$this->call(UserSeeder::class);
$this->call(CustomerSeeder::class);
}

View File

@ -15,23 +15,11 @@ class CategoryTableSeeder extends Seeder
$now = Carbon::now();
DB::table('categories')->insert([
['id' => '1','position' => '1','image' => NULL,'status' => '1','_lft' => '1','_rgt' => '14','parent_id' => NULL, 'created_at' => $now, 'updated_at' => $now],
['id' => '2','position' => '1','image' => NULL,'status' => '1','_lft' => '2','_rgt' => '7','parent_id' => '1', 'created_at' => $now, 'updated_at' => $now],
['id' => '3','position' => '2','image' => NULL,'status' => '1','_lft' => '8','_rgt' => '13','parent_id' => '1', 'created_at' => $now, 'updated_at' => $now],
['id' => '4','position' => '1','image' => NULL,'status' => '1','_lft' => '5','_rgt' => '6','parent_id' => '2', 'created_at' => $now, 'updated_at' => $now],
['id' => '5','position' => '2','image' => NULL,'status' => '1','_lft' => '3','_rgt' => '4','parent_id' => '2', 'created_at' => $now, 'updated_at' => $now],
['id' => '6','position' => '1','image' => NULL,'status' => '1','_lft' => '9','_rgt' => '10','parent_id' => '3', 'created_at' => $now, 'updated_at' => $now],
['id' => '7','position' => '2','image' => NULL,'status' => '1','_lft' => '11','_rgt' => '12','parent_id' => '3', 'created_at' => $now, 'updated_at' => $now]
['id' => '1','position' => '1','image' => NULL,'status' => '1','_lft' => '1','_rgt' => '14','parent_id' => NULL, 'created_at' => $now, 'updated_at' => $now]
]);
DB::table('category_translations')->insert([
['id' => '1','name' => 'Root','slug' => 'root','description' => 'Root','meta_title' => '','meta_description' => '','meta_keywords' => '','category_id' => '1','locale' => 'en'],
['id' => '2','name' => 'Women','slug' => 'women','description' => 'Women','meta_title' => '','meta_description' => '','meta_keywords' => '','category_id' => '2','locale' => 'en'],
['id' => '3','name' => 'Men','slug' => 'men','description' => 'Men','meta_title' => '','meta_description' => '','meta_keywords' => '','category_id' => '3','locale' => 'en'],
['id' => '4','name' => 'Tops','slug' => 'tops-women','description' => 'Tops','meta_title' => '','meta_description' => '','meta_keywords' => '','category_id' => '4','locale' => 'en'],
['id' => '5','name' => 'Bottoms','slug' => 'bottoms-women','description' => 'Bottoms','meta_title' => '','meta_description' => '','meta_keywords' => '','category_id' => '5','locale' => 'en'],
['id' => '6','name' => 'Tops','slug' => 'tops-men','description' => 'Tops','meta_title' => '','meta_description' => '','meta_keywords' => '','category_id' => '6','locale' => 'en'],
['id' => '7','name' => 'Bottoms','slug' => 'bottoms-men','description' => 'Bottoms','meta_title' => '','meta_description' => '','meta_keywords' => '','category_id' => '7','locale' => 'en']
['id' => '1','name' => 'Root','slug' => 'root','description' => 'Root','meta_title' => '','meta_description' => '','meta_keywords' => '','category_id' => '1','locale' => 'en']
]);
}
}

View File

@ -15,6 +15,7 @@ class ChannelTableSeeder extends Seeder
'id' => 1,
'code' => 'default',
'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 style="width: 100%; float: left; padding: 0 18px; margin-bottom: 40px;"><div style="width: 60%; float: left;"><img src="themes/default/assets/images/1.png" /></div><div style="width: 40%; float: left;"><img src="themes/default/assets/images/2.png" /> <img style="margin-top: 36px;" src="themes/default/assets/images/3.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>',
'name' => 'Default',