PHP code example of dvixi / yii2-alpaca-json

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

    

dvixi / yii2-alpaca-json example snippets


php composer.phar 
`
    \Yii::$container->set(
        'dvixi\alpaca\Module',
        function ($container, $params, $config) {
            $config['languages'] = \common\helpers\LanguageHelper::getApplicationLanguages();
            $config['defaultLanguage'] = \common\helpers\LanguageHelper::getDefaultLanguage()->locale;
    
            return new \dvixi\alpaca\Module('jsonPage', null, $config);
        }
    );