How to quit a job with class?

so if I ever need to go back then I can.
...............................................................................
Give them at least two weeks notice. This is the least you can do to leave with class and not burn bridges. Two weeks should be enough time to find a replacement, have you train other people to do your job, and whatever else is needed to make the transition easier for them.

In your letter of resignation, say that you appreciate the opportunity to work there. Don't use it as a place to vent about what you didn't like about the job.
...............................................................................
Mention to your boss that you appreciate the time you spent working there, and you would like the option of returning, but you need to leave right now due to (fill in the blank).

Tell your co-workers that you had fun and enjoyed working with them (even if you didn't). That helps make everyone feel good while you're on your way out.
...............................................................................
make a letter of resignation. Type it and give it to your boss