Every time I add a new entry to the database I want a 10 digit unique number to be added along with it. See the code I have below with the random number but when the database gets big I want to ensure the number never gets generated again
$newIntent = new Invent;
$newIntent->house_number = rand();
$newIntent->company_name = "dsdasda";
$newIntent->address = "dsdasda";
$newIntent->email = "dsdasda";
$newIntent->mobile_cell = "dsdasda";
$newIntent->mobile_other = "dsdasda";
$newIntent->save();
echo "Saved";