PHP code example of flyo / nitro-yii2

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

    

flyo / nitro-yii2 example snippets


'modules' => [
    'flyo' => [
        'class' => \Flyo\Yii\Module::class,
        'token' => 'YOUR_TOKEN',
    ]
]


use Flyo\Yii\Widgets\PageWidget;
/** @var \Flyo\Model\Page $page */

/** @var \Flyo\Model\Block $block */
print_r($block->getContent());
print_r($block->getConfig());
print_r($block->getItems());
print_r($block->getSlots());

 $nav = ContainerWidget::begin(['identifier' => 'main']) 


use Flyo\Yii\Widgets\BlockWidget;
/** @var \Flyo\Model\Block $block */
$config = $block->getConfig();

'<path:(the-requested-slug)>/<slug:[a-z\-]+>' => 'flyo/nitro/index',

<a href="/the-requested-slug/<?= ...;