Can't erase my phone
Have you tried putting the phone in recovery mode and then unlocking the iCloud restriction afterwards? Hold down the sleep/wake and Home button until the iPhone goes into recovery mode and then erase it by connecting it to iTunes via a Lightning cable. Once the phone is erased it will require you to login to your iCloud account to unlock it.