update deploy
This commit is contained in:
30
database/factories/CategoryFactory.php
Normal file
30
database/factories/CategoryFactory.php
Normal 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
|
||||
{
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
$label = fake()->unique()->words(2, true);
|
||||
|
||||
return [
|
||||
'slug' => Str::slug($label),
|
||||
'label' => ucfirst($label),
|
||||
'desc' => fake()->paragraph(),
|
||||
'image' => null,
|
||||
'meta_title' => fake()->sentence(4),
|
||||
'meta_description' => fake()->sentence(10),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user