ldc-legaulois/database/factories/SellItemFactory.php
2024-10-24 08:45:29 +00:00

32 lines
963 B
PHP

<?php
namespace Database\Factories;
use App\Enums\Shop\SellItemsType;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\SellItem>
*/
class SellItemFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->words(rand(1, 2), true),
'picture' => '',
'picture_alt' => fake()->sentence(),
'picture_title' => fake()->sentence(),
'price' => fake()->numberBetween(1, 100),
'arcadia_weight' => fake()->numberBetween(1, 100),
'arcadia_id' => fake()->unique()->numberBetween(100, 500),
'order' => 1,
'type' => \collect(SellItemsType::toArray())->random()->value,
];
}
}