Completed
Push — master ( 06c314...612aa7 )
by Scott
02:14
created
updates/dev_seeds.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -26,6 +26,9 @@
 block discarded – undo
26 26
         $child2 = Factory::create(new Category, ['name' => 'Child 2', 'slug' => 'child-2', 'parent_id' => $parent2->id]);
27 27
     }
28 28
 
29
+    /**
30
+     * @param integer $count
31
+     */
29 32
     protected function seedProducts($count)
30 33
     {
31 34
         $categories = Category::count();
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 
21 21
     protected function seedCategories()
22 22
     {
23
-        $parent1 = Factory::create(new Category, ['name' => 'Parent 1', 'slug' => 'parent-1']);
24
-        $parent2 = Factory::create(new Category, ['name' => 'Parent 2', 'slug' => 'parent-2']);
25
-        $child1 = Factory::create(new Category, ['name' => 'Child 1', 'slug' => 'child-1', 'parent_id' => $parent1->id]);
26
-        $child2 = Factory::create(new Category, ['name' => 'Child 2', 'slug' => 'child-2', 'parent_id' => $parent2->id]);
23
+        $parent1 = Factory::create(new Category, [ 'name' => 'Parent 1', 'slug' => 'parent-1' ]);
24
+        $parent2 = Factory::create(new Category, [ 'name' => 'Parent 2', 'slug' => 'parent-2' ]);
25
+        $child1 = Factory::create(new Category, [ 'name' => 'Child 1', 'slug' => 'child-1', 'parent_id' => $parent1->id ]);
26
+        $child2 = Factory::create(new Category, [ 'name' => 'Child 2', 'slug' => 'child-2', 'parent_id' => $parent2->id ]);
27 27
     }
28 28
 
29 29
     protected function seedProducts($count)
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
         $categories = Category::count();
32 32
 
33 33
         for ($i = 0; $i < $count; $i++) {
34
-            $product = Factory::create(new Product, ['name' => 'Product ' . $i, 'slug' => 'product-' . $i]);
35
-            $product->categories()->sync([rand(1, $categories)]);
34
+            $product = Factory::create(new Product, [ 'name' => 'Product '.$i, 'slug' => 'product-'.$i ]);
35
+            $product->categories()->sync([ rand(1, $categories) ]);
36 36
         }
37 37
     }
38 38
 }
Please login to merge, or discard this patch.