diff --git a/database/seeds/AvoRedDataSeeder.php b/database/seeds/AvoRedDataSeeder.php index 98c5dc1..38100c0 100644 --- a/database/seeds/AvoRedDataSeeder.php +++ b/database/seeds/AvoRedDataSeeder.php @@ -8,7 +8,6 @@ use AvoRed\Ecommerce\Models\Database\Page; use AvoRed\Framework\Models\Database\Configuration; - class AvoRedDataSeeder extends Seeder { /** @@ -32,12 +31,11 @@ public function run() 'slug' => 'bedroom' ]); $livingRoomCategory = Category::create([ - 'parent_id' => null, + 'parent_id' => null, 'name' => 'Living Room', 'slug' => 'living-room' ]); - $product = Product::create([ 'name' => 'Flower Pot', 'slug' => 'flower-pot', @@ -45,7 +43,7 @@ public function run() 'description' => $faker->realText(rand(3000, 6000)), 'status' => 1, 'in_stock' => 1, - 'price' => rand(2, 10) . "0." . rand(1, 9) . "0", + 'price' => rand(2, 10) . '0.' . rand(1, 9) . '0', 'track_stock' => 1, 'qty' => rand(10, 1000), 'is_taxable' => 1, @@ -54,7 +52,7 @@ public function run() ]); $product->categories()->sync($livingRoomCategory->id); - ProductImage::create(['path' => '/uploads/catalog/images/f/h/2/flower-pot.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); + ProductImage::create(['path' => 'storage/uploads/catalog/images/f/h/2/flower-pot.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); $product = Product::create([ 'name' => 'Classic TV Stand', @@ -64,7 +62,7 @@ public function run() 'description' => $faker->realText(rand(3000, 6000)), 'status' => 1, 'in_stock' => 1, - 'price' => rand(2, 10) . "0." . rand(1, 9) . "0", + 'price' => rand(2, 10) . '0.' . rand(1, 9) . '0', 'track_stock' => 1, 'qty' => rand(10, 1000), 'is_taxable' => 1, @@ -73,7 +71,7 @@ public function run() ]); $product->categories()->sync($livingRoomCategory->id); - ProductImage::create(['path' => '/uploads/catalog/images/d/0/c/classic-tv-stand.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); + ProductImage::create(['path' => 'storage/uploads/catalog/images/d/0/c/classic-tv-stand.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); $product = Product::create([ 'name' => 'Classic Vintage Curtain', @@ -84,7 +82,7 @@ public function run() 'status' => 1, 'in_stock' => 1, 'track_stock' => 1, - 'price' => rand(2, 10) . "0." . rand(1, 9) . "0", + 'price' => rand(2, 10) . '0.' . rand(1, 9) . '0', 'qty' => rand(10, 1000), 'is_taxable' => 1, 'meta_title' => '', @@ -92,7 +90,7 @@ public function run() ]); $product->categories()->sync($livingRoomCategory->id); - ProductImage::create(['path' => '/uploads/catalog/images/y/f/r/textiles-2.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); + ProductImage::create(['path' => 'storage/uploads/catalog/images/y/f/r/textiles-2.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); $product = Product::create([ 'name' => 'Comfirtable Couch', @@ -103,7 +101,7 @@ public function run() 'status' => 1, 'in_stock' => 1, 'track_stock' => 1, - 'price' => rand(2, 10) . "0." . rand(1, 9) . "0", + 'price' => rand(2, 10) . '0.' . rand(1, 9) . '0', 'qty' => rand(10, 1000), 'is_taxable' => 1, 'meta_title' => '', @@ -111,7 +109,7 @@ public function run() ]); $product->categories()->sync($livingRoomCategory->id); - ProductImage::create(['path' => '/uploads/catalog/images/1/k/0/-Single-Panel-New-Pastoral-Linen-Blending-Embroidered-Living-Room-font-b-Curtain-b-font-font.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); + ProductImage::create(['path' => 'storage/uploads/catalog/images/1/k/0/-Single-Panel-New-Pastoral-Linen-Blending-Embroidered-Living-Room-font-b-Curtain-b-font-font.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); $product = Product::create([ 'type' => 'BASIC', @@ -122,7 +120,7 @@ public function run() 'status' => 1, 'in_stock' => 1, 'track_stock' => 1, - 'price' => rand(2, 10) . "0." . rand(1, 9) . "0", + 'price' => rand(2, 10) . '0.' . rand(1, 9) . '0', 'qty' => rand(10, 1000), 'is_taxable' => 1, 'meta_title' => '', @@ -130,9 +128,9 @@ public function run() ]); $product->categories()->sync($livingRoomCategory->id); - ProductImage::create(['path' => '/uploads/catalog/images/q/o/m/comfortable-leather-chair-published-under-the-most-comfortable-couch-group.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); + ProductImage::create(['path' => 'storage/uploads/catalog/images/q/o/m/comfortable-leather-chair-published-under-the-most-comfortable-couch-group.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - $title = "Medium White Couch"; + $title = 'Medium White Couch'; $product = Product::create([ 'type' => 'BASIC', 'name' => $title, @@ -142,7 +140,7 @@ public function run() 'status' => 1, 'in_stock' => 1, 'track_stock' => 1, - 'price' => rand(2, 10) . "0." . rand(1, 9) . "0", + 'price' => rand(2, 10) . '0.' . rand(1, 9) . '0', 'qty' => rand(10, 1000), 'is_taxable' => 1, 'meta_title' => '', @@ -150,9 +148,9 @@ public function run() ]); $product->categories()->sync($livingRoomCategory->id); - ProductImage::create(['path' => '/uploads/catalog/images/s/e/j/ff815ea7756de71d6c5edb5566330df6.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); + ProductImage::create(['path' => 'storage/uploads/catalog/images/s/e/j/ff815ea7756de71d6c5edb5566330df6.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - $title = "Comfirtable Gray Bed"; + $title = 'Comfirtable Gray Bed'; $comfirtableGrayBedProduct = Product::create([ 'name' => $title, 'type' => 'BASIC', @@ -161,7 +159,7 @@ public function run() 'description' => $faker->realText(rand(3000, 6000)), 'status' => 1, 'in_stock' => 1, - 'price' => rand(2, 10) . "0." . rand(1, 9) . "0", + 'price' => rand(2, 10) . '0.' . rand(1, 9) . '0', 'track_stock' => 1, 'qty' => rand(10, 1000), 'is_taxable' => 1, @@ -170,9 +168,9 @@ public function run() ]); $product->categories()->sync($bedroomCategory->id); - ProductImage::create(['path' => '/uploads/catalog/images/v/t/x/bed-bedding-comfortable-platform-with-smooth-gray-also-are-beds-and-headboard-plus-small-.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); + ProductImage::create(['path' => 'storage/uploads/catalog/images/v/t/x/bed-bedding-comfortable-platform-with-smooth-gray-also-are-beds-and-headboard-plus-small-.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - $title = "Cute Teddy Bear"; + $title = 'Cute Teddy Bear'; $product = Product::create([ 'name' => $title, 'slug' => str_slug($title), @@ -181,7 +179,7 @@ public function run() 'status' => 1, 'in_stock' => 1, 'track_stock' => 1, - 'price' => rand(2, 10) . "0." . rand(1, 9) . "0", + 'price' => rand(2, 10) . '0.' . rand(1, 9) . '0', 'qty' => rand(10, 1000), 'is_taxable' => 1, 'meta_title' => '', @@ -190,9 +188,9 @@ public function run() ]); $product->categories()->sync($bedroomCategory->id); - ProductImage::create(['path' => '/uploads/catalog/images/z/c/u/d5d710257f2cf7cf2576f4a43dc40430.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); + ProductImage::create(['path' => 'storage/uploads/catalog/images/z/c/u/d5d710257f2cf7cf2576f4a43dc40430.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - $title = "Minimalist Ceramic Lamp"; + $title = 'Minimalist Ceramic Lamp'; $product = Product::create([ 'name' => $title, 'slug' => str_slug($title), @@ -201,7 +199,7 @@ public function run() 'status' => 1, 'in_stock' => 1, 'track_stock' => 1, - 'price' => rand(2, 10) . "0." . rand(1, 9) . "0", + 'price' => rand(2, 10) . '0.' . rand(1, 9) . '0', 'qty' => rand(10, 1000), 'is_taxable' => 1, 'meta_title' => '', @@ -210,9 +208,9 @@ public function run() ]); $product->categories()->sync($bedroomCategory->id); - ProductImage::create(['path' => '/uploads/catalog/images/m/2/z/b594a5c88e527b467508aa9fa3b01228.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); + ProductImage::create(['path' => 'storage/uploads/catalog/images/m/2/z/b594a5c88e527b467508aa9fa3b01228.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - $title = "Wooden Bunk Bed"; + $title = 'Wooden Bunk Bed'; $product = Product::create([ 'name' => $title, 'slug' => str_slug($title), @@ -221,7 +219,7 @@ public function run() 'status' => 1, 'in_stock' => 1, 'track_stock' => 1, - 'price' => rand(2, 10) . "0." . rand(1, 9) . "0", + 'price' => rand(2, 10) . '0.' . rand(1, 9) . '0', 'qty' => rand(10, 1000), 'is_taxable' => 1, 'meta_title' => '', @@ -230,9 +228,9 @@ public function run() ]); $product->categories()->sync($bedroomCategory->id); - ProductImage::create(['path' => '/uploads/catalog/images/4/5/n/il_570xN.262261571.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); + ProductImage::create(['path' => 'storage/uploads/catalog/images/4/5/n/il_570xN.262261571.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - $title = "Cooktail Mixed"; + $title = 'Cooktail Mixed'; $product = Product::create([ 'name' => $title, 'slug' => str_slug($title), @@ -241,7 +239,7 @@ public function run() 'status' => 1, 'in_stock' => 1, 'track_stock' => 1, - 'price' => rand(2, 10) . "0." . rand(1, 9) . "0", + 'price' => rand(2, 10) . '0.' . rand(1, 9) . '0', 'qty' => rand(10, 1000), 'is_taxable' => 1, 'meta_title' => '', @@ -250,9 +248,9 @@ public function run() ]); $product->categories()->sync($kitchenCategory->id); - ProductImage::create(['path' => '/uploads/catalog/images/n/y/n/CC2600.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); + ProductImage::create(['path' => 'storage/uploads/catalog/images/n/y/n/CC2600.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - $title = "Coffee Making Machine"; + $title = 'Coffee Making Machine'; $product = Product::create([ 'name' => $title, 'slug' => str_slug($title), @@ -262,7 +260,7 @@ public function run() 'in_stock' => 1, 'track_stock' => 1, 'qty' => rand(10, 1000), - 'price' => rand(2, 10) . "0." . rand(1, 9) . "0", + 'price' => rand(2, 10) . '0.' . rand(1, 9) . '0', 'is_taxable' => 1, 'meta_title' => '', 'meta_description' => '', @@ -270,9 +268,9 @@ public function run() ]); $product->categories()->sync($kitchenCategory->id); - ProductImage::create(['path' => '/uploads/catalog/images/t/b/n/20121018143846738.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); + ProductImage::create(['path' => 'storage/uploads/catalog/images/t/b/n/20121018143846738.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - $title = "Luxury Cooking Utensil"; + $title = 'Luxury Cooking Utensil'; $product = Product::create([ 'name' => $title, 'slug' => str_slug($title), @@ -282,7 +280,7 @@ public function run() 'in_stock' => 1, 'track_stock' => 1, 'qty' => rand(10, 1000), - 'price' => rand(2, 10) . "0." . rand(1, 9) . "0", + 'price' => rand(2, 10) . '0.' . rand(1, 9) . '0', 'is_taxable' => 1, 'meta_title' => '', 'meta_description' => '', @@ -290,9 +288,9 @@ public function run() ]); $product->categories()->sync($kitchenCategory->id); - ProductImage::create(['path' => '/uploads/catalog/images/l/i/k/coffee-maker-20.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); + ProductImage::create(['path' => 'storage/uploads/catalog/images/l/i/k/coffee-maker-20.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - $title = "Vintage Toaste"; + $title = 'Vintage Toaste'; $product = Product::create([ 'name' => $title, 'slug' => str_slug($title), @@ -301,7 +299,7 @@ public function run() 'status' => 1, 'in_stock' => 1, 'track_stock' => 1, - 'price' => rand(2, 10) . "0." . rand(1, 9) . "0", + 'price' => rand(2, 10) . '0.' . rand(1, 9) . '0', 'qty' => rand(10, 1000), 'is_taxable' => 1, 'meta_title' => '', @@ -313,40 +311,33 @@ public function run() 'name' => $kitchenCategory->name, 'params' => $kitchenCategory->slug, 'route' => 'category.view', - ]); \AvoRed\Ecommerce\Models\Database\Menu::create([ 'name' => $bedroomCategory->name, 'params' => $bedroomCategory->slug, 'route' => 'category.view', - ]); \AvoRed\Ecommerce\Models\Database\Menu::create([ 'name' => $livingRoomCategory->name, 'params' => $livingRoomCategory->slug, 'route' => 'category.view', - ]); \AvoRed\Ecommerce\Models\Database\Menu::create([ 'name' => 'My Account', 'route' => 'my-account.home', - ]); \AvoRed\Ecommerce\Models\Database\Menu::create([ 'name' => 'Cart', 'route' => 'cart.view', - ]); \AvoRed\Ecommerce\Models\Database\Menu::create([ 'name' => 'Checkout', 'route' => 'checkout.index', - ]); $product->categories()->sync($kitchenCategory->id); ProductImage::create(['path' => '/uploads/catalog/images/0/y/4/tsf02crsa.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - $homePageContent = html_entity_decode('

 

 

HOME PAGE FOR AvoRed E COMMERCE LARAVEL OPEN SOURCE SHOPPING CART

 

Please star us on https://github.com/avored/laravel-ecommerce

Like us on Facebook : https://www.facebook.com/avored/

Follow us on Twitter: https://twitter.com/avoredecommerce/

'); $homePage = Page::create(['name' => 'Home Page', 'slug' => 'home-page', @@ -361,6 +352,5 @@ public function run() 'meta_title' => 'Term & Condition - AvoRed E commerce']); Configuration::create(['configuration_key' => 'general_term_condition_page', 'configuration_value' => $termPage->id]); - } } diff --git a/register.yaml b/register.yaml index 9ad63c5..394087c 100644 --- a/register.yaml +++ b/register.yaml @@ -1,3 +1,5 @@ +name: AvoRed Dummy Data identifier: avored-dummy-data description: AvoRed Dummy Data Module -namespace: AvoRed\DummyData\ \ No newline at end of file +namespace: AvoRed\DummyData\ +status: Enabled \ No newline at end of file