pai-sklep/database/factories/ProductFactory.php
2021-12-08 23:39:53 +01:00

31 lines
673 B
PHP

<?php
namespace Database\Factories;
use App\Models\Product;
use Illuminate\Database\Eloquent\Factories\Factory;
class ProductFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Product::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'uuid' => $this->faker->unique()->uuid(),
'name' => $this->faker->productName(),
'price' => $this->faker->numberBetween(1, 32124),
'description' => $this->faker->text(10000),
];
}
}