29 lines
679 B
PHP
29 lines
679 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\SmsProfile;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
|
|
/**
|
|
* @extends Factory<SmsProfile>
|
|
*/
|
|
class SmsProfileFactory extends Factory
|
|
{
|
|
protected $model = SmsProfile::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'uuid' => (string) Str::uuid(),
|
|
'name' => $this->faker->unique()->words(2, true),
|
|
'active' => true,
|
|
'api_username' => $this->faker->userName(),
|
|
// use attribute mutator to encrypt
|
|
'api_password' => 'secret-'.Str::random(8),
|
|
'settings' => [],
|
|
];
|
|
}
|
|
}
|