I was wondering if there is a way to automatically enable and disable the bluetooth on the phone.
What do you mean by automatically? Is it a case when you enable bluetooth in some region or at a specific time?
If that's what you meant, then unfortunately it's not possible. Users decide if they want to turn on/off Bluetooth.
Automatically when a customer enter to an specific region (In the entrance of a store, for example)
If you are concerned about the battery life of the user's phone, you should not be. Bluetooth Low Energy, as its name suggests, consumes minimal amount of power even if it is kept turned on for the whole day. It will not have any significant influence on the consumed power compared to the case when it is turned on just occasionally. Moreover, it saves power when it is not interacting with any devices.
It is BLE that lets your phone know that you entered a particular beacon region. I recommend you to have it turned on to make the beacon experience seamless.