Uploading content

This commit is contained in:
David
2025-03-12 00:41:31 -04:00
parent b192e57eb5
commit f70ef52f9e
108 changed files with 13255 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Product>
*/
class ProductFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->word() . ' ' . fake()->randomNumber(),
'description' => fake()->sentence(),
'price' => fake()->randomFloat(2, 1, 1000),
'stock' => fake()->numberBetween(0, 500),
'category' => fake()->randomElement(['Electronics', 'Clothing', 'Books', 'Home', 'Toys', 'Sports']),
'brand' => fake()->company(),
'sku' => strtoupper(Str::random(10)),
'weight' => fake()->randomFloat(2, 0.1, 50),
'status' => fake()->randomElement(['available', 'out_of_stock', 'discontinued']),
'order' => fake()->numberBetween(1, 100),
];
}
}