I'm not sure if I agree with this approach. I would say ask for a raise without showing you have an offer from another company. If they don't then leave. I feel like it is awkward to show them that you have offer and then stay. But It could be just me.