Reputation: 13
i have this table Info
ID | tel1 | tel2 |
1 | 080 | 0000 |
when i run Info::all();
the output is
tel1 = 08,
tel2 = 0,
i need to remain the zero at the end of the data;
my table structure
tel1 mediumint(3) unsigned zerofill
tel2 mediumint(4) unsigned zerofill
im using laravel
Upvotes: 0
Views: 304
Reputation: 1509
If I understood correct those columns are phone numbers. Also if its number it could contain in future some '+' sign or '(' and ')'. Try to store them better as VARCHAR instead of Integers.
Upvotes: 1