You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
json2db/database/factories/UserFactory.php

49 lines
1.4 KiB

<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition()
{
return [
'name' => fake()->name(),
'account' => fake()->numberBetween(10000,99999),
'address' => fake()->address(),
'checked' => fake()->boolean(),
'email' => fake()->unique()->safeEmail(),
'description' => fake()->realText(),
'interest' => fake()->jobTitle(),
'date_of_birth' => fake()->dateTimeBetween('-70 years', 'now'),
'credit_card' => json_encode([
"type" => fake()->creditCardType(),
"number" => fake()->creditCardNumber(),
"name" => fake()->name(),
"expirationDate" => fake()->creditCardExpirationDateString(),
]),
];
}
/**
* Indicate that the model's email address should be unverified.
*
* @return static
*/
public function unverified()
{
return $this->state(fn(array $attributes) => [
'email_verified_at' => null,
]);
}
}