PHP code example of jnjxp / urlhelper

1. Go to this page and download the library: Download jnjxp/urlhelper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jnjxp / urlhelper example snippets




use Jnjxp\Urlhelper;

// Pass an aura router container to the urlHelperContainer
$urlHelperContainer = new UrlHelper\Container($routerContainer);

// add the middleware to your stack to have the request injected
// probably want to add it quite late
$stack->middle($urlHelperContainer->getMiddleware());

// add the helper to aura html helpers
$helpers->set('url', [$urlHelperContainer, 'getHelper']);