PHP code example of felixmaier1989 / yii2-renderdual

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

    

felixmaier1989 / yii2-renderdual example snippets


...
use yii2renderdual\RenderDual;

class SiteController extends Controller
{
    public function behaviors()
    {
        return [
            ...
            \yii2renderdual\RenderDual::className()
        ];
    }

    public function actionAbout()
    {
        Yii::$app->session->setFlash('success', 'Welcome on my home page');
        $fruits = ['banana', 'apple', 'jackfruit', 'papaya'];
        return $this->renderDual('about', compact('fruits'), true);
    }
...

php composer.phar