#2 fix conflict

This commit is contained in:
Saufi
2026-05-12 11:33:35 +08:00
19 changed files with 830 additions and 51 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace Database\Factories;
use App\Models\Category;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends Factory<Category>
*/
class CategoryFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
$name = fake()->unique()->words(2, true);
return [
'name' => Str::title($name),
'slug' => Str::slug($name),
'description' => fake()->sentence(),
'color' => fake()->hexColor(),
];
}
}