Thursday, March 9, 2017

How to handle BIGINT on PHP Laravel

I've got a project that create a web page using PHP Laravel, and want to create a user login. On the database I created UserID column, with varchar as the data type, the User ID format 'USxxxxxxxxxx' the x are number and it will auto increment. So I create a function to substring the number and change it to Int so it will auto increment when new user register to the web. After the increment, the number will store back to a string.

My question is is PHP Laravel can handle 10 digits number(Billion) and what data type that should I use on PHP Laravel?



via Albert Henderson

Advertisement