get current domain cakephp 4 code example Example: get domain from url cakephp Router::url('/', true) . 'img/example.png' (cakephp 2)