Files
laravel-shopping-cart/database/factories/ProductFactory.php
T
2026-04-09 18:40:09 -06:00

28 lines
584 B
PHP

<?php
namespace Database\Factories;
use App\Models\Product;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<Product>
*/
class ProductFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => $this->faker->words(3, true),
'description' => $this->faker->sentence(12),
'price_cents' => $this->faker->numberBetween(499, 9999),
'image_url' => null,
];
}
}