How to get current URL in CakePHP ?

by trycia.jones , in category: Technology , 3 years ago

How to get current URL in CakePHP ?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by dion.waelchi , 3 years ago

In Cakephp 2.x you can get current url in view by using 

1
$this->hereor Router::url( $this->here, true );

In Cakephp 3.x you can get current url in view by using 

1
$this->Url->build(null, true);