23 lines
495 B
PHP
23 lines
495 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Category;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Category>
|
|
*/
|
|
class CategoryFactory extends Factory
|
|
{
|
|
protected $model = Category::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'name' => strtoupper($this->faker->bothify('CAT-??')),
|
|
'order' => $this->faker->numberBetween(1, 20),
|
|
];
|
|
}
|
|
}
|