presseportale/database/factories/ProfileFactory.php
Kevin Adametz 5b8bdf4182
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run
12-05-2026 Frontend dev
2026-05-12 18:32:33 +02:00

42 lines
1.4 KiB
PHP

<?php
namespace Database\Factories;
use App\Models\Profile;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<Profile>
*/
class ProfileFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'user_id' => User::factory(),
'salutation_key' => fake()->randomElement(['mr', 'mrs', 'none']),
'title' => fake()->optional()->title(),
'first_name' => fake()->firstName(),
'last_name' => fake()->lastName(),
'phone' => fake()->optional()->phoneNumber(),
'address' => fake()->optional()->streetAddress(),
'country_code' => 'DE',
'birthdate' => fake()->optional()->date(),
'backlink_url' => fake()->optional()->url(),
'show_stats' => fake()->boolean(),
'validation_date' => fake()->optional()->dateTimeBetween('-5 years'),
'contract_date' => fake()->optional()->dateTimeBetween('-10 years'),
'validate_token' => fake()->optional()->regexify('[A-Za-z0-9]{17}'),
'tax_id_number' => fake()->optional()->numerify('DE#########'),
'tax_exempt' => false,
'tax_exempt_reason' => null,
'disable_footer_code' => false,
];
}
}