PHP code example of yiiplus / yii2-app-devhosts

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

    

yiiplus / yii2-app-devhosts example snippets


'modules' => [
    ...
    'app-devhosts' => [
        'class' => 'yiiplus\appDevhosts\Module',
    ],
    ...
],

'components' => [
    ...
    'i18n' => [
        'translations' => [
            '*' => [
                'class' => 'yii\i18n\PhpMessageSource'
            ],
        ],
    ],
    ...
]

//Controller
Class AppDevhostsController extends Controller
{
    function actions(){
       return [
            ...
            'index' => [
            	'class' => 'yiiplus\appDevhosts\actions\ApiActions'
            ],
            ...
        ];
    }
}