. */ namespace Database\Factories; use App\Account; use App\Http\Controllers\Account\AuthenticateController as WebAuthenticateController; use Illuminate\Support\Str; use Illuminate\Database\Eloquent\Factories\Factory; class AccountFactory extends Factory { protected $model = Account::class; public function definition() { return [ 'username' => $this->faker->username, 'display_name' => $this->faker->username, 'domain' => config('app.sip_domain'), 'email' => $this->faker->email, 'user_agent' => $this->faker->userAgent, 'confirmation_key' => Str::random(WebAuthenticateController::$emailCodeSize), 'provisioning_token' => Str::random(WebAuthenticateController::$emailCodeSize), 'ip_address' => $this->faker->ipv4, 'creation_time' => $this->faker->dateTime, 'dtmf_protocol' => array_rand(Account::$dtmfProtocols), 'activated' => true ]; } }