*/ class TargetDatabaseFactory extends Factory { protected $model = TargetDatabase::class; public function definition(): array { return [ 'name' => fake()->unique()->company() . ' Target DB', 'host' => fake()->randomElement(['localhost', '127.0.0.1', 'target.db.example.com']), 'port' => 5432, 'database' => fake()->unique()->word() . '_target_db', 'username' => fake()->userName(), 'password' => fake()->password(16), 'driver' => 'pgsql', 'description' => fake()->optional()->sentence(), 'is_active' => true, ]; } public function inactive(): static { return $this->state(fn (array $attributes) => [ 'is_active' => false, ]); } }