2
Good afternoon. I’m having a problem making use of the zerofill Constraint in Laravel because I saw that it is not in the documentation.
I have a field in my table that is enrollment and in my view I am limiting this field to 5 digits, so the maximum value that it can reach is: 99999. But I would like when the user typed a registration number without using all the digits, the spaces were filled with 0.
For example, the user informs the registration number: 450. The bank should be showing 00450.
How can I do it in the Laravel?
My Migration is like this:
$table->integer('matricula')->unique();