How to get current URL in CakePHP ?

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

How to get current URL in CakePHP ?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by dion.waelchi , 4 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);


Related Threads:

How to get current url in Yii?
How to get the current route in Symfony Framework?
How to get a short URL for LinkedIn?
How to get a short URL for Google Maps?
How to get a short URL for a Facebook page?
How to get a short URL for your YouTube channel?