Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

246
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!