Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
15 | public function run() |
||
16 | { |
||
17 | $supplier = Supplier::first(); |
||
18 | Make::all()->each(function (Make $make) use ($supplier) { |
||
19 | factory(Purchase::class, 2)->create(['make_id' => $make->id, 'supplier_id' => $supplier->id]); |
||
20 | factory(Purchase::class, 'delivered', 5) |
||
21 | ->create([ |
||
22 | 'make_id' => $make->id, |
||
23 | 'supplier_id' => $supplier->id, |
||
24 | 'quantity' => rand(20, 100) |
||
25 | ]); |
||
26 | }); |
||
27 | } |
||
28 | } |
||
29 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.