Initial commit
This commit is contained in:
22
database/factories/CategoryFactory.php
Normal file
22
database/factories/CategoryFactory.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user