feat(factories): add new factories and update existing ones for all models

This commit is contained in:
F4ilji
2026-09-18 01:39:25 +05:00
parent c7a779d9aa
commit 02455fbca7
31 changed files with 530 additions and 15 deletions
@@ -0,0 +1,26 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class ContactWidgetFactory extends Factory
{
protected $model = \App\Containers\Widget\Models\ContactWidget::class;
public function definition(): array
{
$title = $this->faker->unique()->words(2, true);
return [
'title' => $title,
'slug' => Str::slug($title),
'content' => [
['type' => 'phone', 'value' => $this->faker->phoneNumber],
['type' => 'email', 'value' => $this->faker->safeEmail],
['type' => 'address', 'value' => $this->faker->address],
],
'is_active' => $this->faker->boolean(80),
];
}
}