35 lines
972 B
PHP
35 lines
972 B
PHP
<?php
|
|
|
|
namespace Modules\Catalog\Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Modules\Catalog\Models\EvCompany;
|
|
|
|
/**
|
|
* @extends Factory<EvCompany>
|
|
*/
|
|
class EvCompanyFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'name' => fake()->company(),
|
|
'mm_name' => fake()->company(),
|
|
'slug' => fake()->unique()->slug(),
|
|
'description' => fake()->sentence(),
|
|
'mm_description' => null,
|
|
// fake()->phoneNumber() occasionally emits formats (e.g. extensions like "x1234")
|
|
// that fail the form's ->tel() regex validation, making the test flaky.
|
|
'contact' => fake()->numerify('+959#########'),
|
|
'address' => fake()->address(),
|
|
'logo' => null,
|
|
'is_active' => true,
|
|
];
|
|
}
|
|
}
|