added more scopes

This commit is contained in:
denisdulici
2020-05-03 11:15:56 +03:00
parent 70bfe8c524
commit 430c092ebe
32 changed files with 115 additions and 49 deletions

View File

@ -16,7 +16,7 @@ $factory->define(Item::class, function (Faker $faker) use ($company) {
'description' => $faker->text(100),
'purchase_price' => $faker->randomFloat(2, 10, 20),
'sale_price' => $faker->randomFloat(2, 10, 20),
'category_id' => $company->categories()->type('item')->get()->random(1)->pluck('id')->first(),
'category_id' => $company->categories()->item()->get()->random(1)->pluck('id')->first(),
'tax_id' => null,
'enabled' => $faker->boolean ? 1 : 0,
];