corrected error in the apply middleware and changed phone number type from number to string