PHP code example of fancyecommerce / fec_admin

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

    

fancyecommerce / fec_admin example snippets


./yii migrate --migrationPath=@fecadmin/migrations/

'homeUrl' => 'http://admin.fancyecommerce.com',
'modules'=>[
		'fecadmin' => '\fecadmin\Module',
	],
'components' => [
       'user' => [
            'identityClass' => 'fecadmin\models\AdminUser',
            'enableAutoLogin' => true,
        ],
        'urlManager' => [
    			'class' => 'yii\web\UrlManager',
    			'enablePrettyUrl' => true,
    			'showScriptName' => false,
    			'rules' => [
    				'' => 'fecadmin/index/index',
    				//'blog' => 'blog/index/index',
    				
    			],
    		],
    	],


$params = array_merge(
    mmon/config/params-local.php'),
    'app-backend',
    'basePath' => dirname(__DIR__),
    'controllerNamespace' => 'backend\controllers',
    'bootstrap' => ['log'],
	'homeUrl' => 'http://www.fancyecommerce.com',
    'modules' => ['fecadmin' => '\fecadmin\Module',],
    'components' => [
        
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning'],
                ],
            ],
        ],
        'errorHandler' => [
            'errorAction' => 'site/error',
        ],
        /*
        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'rules' => [
            ],
        ],
        */
		
		'user' => [
            'identityClass' => 'fecadmin\models\AdminUser',
            'enableAutoLogin' => true,
        ],
        'urlManager' => [
                'class' => 'yii\web\UrlManager',
                'enablePrettyUrl' => true,
                'showScriptName' => false,
                'rules' => [
                    '' => 'fecadmin/index/index',
                    //'blog' => 'blog/index/index',

                ],
            
        ],
    ],
    'params' => $params,
];