initial commit

This commit is contained in:
Behzad Babaei
2020-03-28 17:02:54 +04:30
commit 851454db11
39 changed files with 946 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding your
| database. Just tell the factory how a default model should look.
|
*/
$factory->define(App\Order::class, function (Faker\Generator $faker) {
$quantity = $faker->numberBetween(1, 10);
return [
'quantity' => $quantity,
'discount' => $faker->numberBetween(1, 30),
'total_price' => ($quantity * $faker->numberBetween(1, 200)),
'product_id' => $faker->numberBetween(1, 50),
];
});