osb/database/factories/ProductFactory.php

29 lines
528 B
PHP
Raw Normal View History

<?php
use Faker\Generator as Faker;
$factory->define(App\Models\Product::class, function (Faker $faker) {
return [
'id'=>1,
2020-02-12 10:32:57 +00:00
'site_id'=>1,
'taxable'=>1,
'price_group'=>serialize([
1=>[
0=>[
'price_setup'=>50,
'price_base'=>100,
]
]
]),
];
});
$factory->state(App\Models\Product::class,'active',[
2020-02-12 10:32:57 +00:00
'active' => 1,
]);
$factory->state(App\Models\Product::class,'strict',[
2020-02-12 10:32:57 +00:00
'price_recurr_strict' => 1,
]);
$factory->state(App\Models\Product::class,'notstrict',[
2020-02-12 10:32:57 +00:00
'price_recurr_strict' => 0,
]);