How do you echo out current URL in Cake\'s view?
All previously proposed approaches didn't satisfy my requirements for getting a complete URL (complete as in qualified) e.g. to be used in an email send from controller action. I need the scheme and hostname as well then, and thus stumbled over the following approach:
Due to providing router array current controller and action is kept, however id isn't and thus has to be provided here again. Second argument true
is actually requesting to prepend hostname etc. for getting full URL.
Using Router::url() is available in every situation and thus can be used in view files as well.