PHP code example of aura / system

1. Go to this page and download the library: Download aura/system 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/ */

    

aura / system example snippets



namespace Example\Package\Web\Home;

use Aura\Framework\Web\Controller\AbstractPage;

class HomePage extends AbstractPage
{
    public function actionIndex()
    {
        $this->view = 'index';
    }
}

 echo "This is an example home page."; 


// attach the path for a route named 'home' to the controller and action
$di->params['Aura\Router\Map']['attach'][''] = [
    // all routes with the '' path prefix (i.e., no prefix)
    'routes' => [
        // a route named 'home'
        'home' => [
            'path' => '/',
            'values' => [
                'controller' => 'home',
                'action'     => 'index',
            ],
        ],
    ]
];

// map the 'home' controller value to the controller class
$di->params['Aura\Framework\Web\Controller\Factory']['map']['home'] = 'Example\Package\Web\Home\HomePage';