You have decided to leave your current job eventhough you enjoy it.
Write a letter to inform your manager of your decision. In your letter
tell the manager about your decision and the reason for it
describe what you learnt in your current job
and ask the manager to write a reference letter to help you with future employment