32 lines
850 B
PHP
32 lines
850 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\MailProfile;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<MailProfile>
|
|
*/
|
|
class MailProfileFactory extends Factory
|
|
{
|
|
protected $model = MailProfile::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'name' => 'Primary SMTP '.$this->faker->unique()->word(),
|
|
'active' => false,
|
|
'host' => 'smtp.example.test',
|
|
'port' => 587,
|
|
'encryption' => 'tls',
|
|
'username' => 'user@example.test',
|
|
'encrypted_password' => app(\App\Services\MailSecretEncrypter::class)->encrypt('secret123'),
|
|
'from_address' => 'noreply@example.test',
|
|
'from_name' => 'Example App',
|
|
'priority' => 0,
|
|
'emails_sent_today' => 0,
|
|
];
|
|
}
|
|
}
|