Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

245
Vistas
Laravel database, what data type should I use to store a passport number?

I'm in the process of developing a Client Registration page for a travel agent. The client needs to save the passport number as a record in the MySQL database. I would like to know the data type ideal for mentioning in the migrations page for storing a Passport number. Usually, a passport number contains one or two English Letters and a few digits.

Schema::create('clients', function (Blueprint $table) {
    $table->id();
    $table->string('surname');
    $table->string('other_names')
    $table->date('dob');
    $table-> ?? ('ppt_no');
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You should really encrypt them before the application goes into production. Otherwise, you probably want an alphanumeric column, like CHAR(9) or VARCHAR(9).

$table->string('passport_number', 9)->unique();
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda