engelsystem/db/factories/User/PasswordResetFactory.php

24 lines
522 B
PHP
Raw Normal View History

2021-06-29 00:27:57 +02:00
<?php
declare(strict_types=1);
2021-06-29 00:27:57 +02:00
namespace Database\Factories\Engelsystem\Models\User;
use Engelsystem\Models\User\PasswordReset;
use Engelsystem\Models\User\User;
2021-06-29 00:27:57 +02:00
use Illuminate\Database\Eloquent\Factories\Factory;
class PasswordResetFactory extends Factory
{
/** @var string */
protected $model = PasswordReset::class; // phpcs:ignore
2021-06-29 00:27:57 +02:00
public function definition(): array
2021-06-29 00:27:57 +02:00
{
return [
'user_id' => User::factory(),
'token' => bin2hex(random_bytes(16)),
2021-06-29 00:27:57 +02:00
];
}
}