Skip to content
Advertisement

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.

JavaScript

Advertisement

Answer

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

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement