php - how to setup second module in yii -


i have configured yii on localhost one module name admin.
have add module name store.

in main.php have:

'import' => array(         'application.models.*',         'application.components.*',         'application.modules.*',         'application.modules.admin.models.*',         'application.modules.store.*',         'application.modules.store.components.*',         'application.modules.store.models.*',         'ext.yii-mail.yiimailmessage',         'application.extensions.eajaxupload.*',         'bootstrap.helpers.*',         'bootstrap.widgets.*',         'bootstrap.components.*',         'ext.ephpthumb.ephpthumb',         ), 'modules' => array(          'gii' => array(             'class' => 'system.gii.giimodule',             'password' => 'abcd11',              'ipfilters' => array('127.0.0.1', '::1'),             ),         'admin' => array('defaultcontroller' => 'admin'),         'store' => array( 'debug' => true ),         ), // application components     'components' => array(         'request' => array(              ),         'epdf' => array(             'class' => 'ext.yii-pdf.eyiipdf',             'params' => array(                 'mpdf' => array(                     'librarysourcepath' => 'application.vendors.mpdf.*',                     'constants' => array(                         '_mpdf_temp_path' => yii::getpathofalias('application.runtime'),                         ),                     'class' => 'mpdf', // literal class filename loaded vendors folder                      ),                 ),             ),         'bootstrap' => array(             'class' => 'bootstrap.components.tbapi', // bootstrap configuration             ),         'yiiwheels' => array(             'class' => 'yiiwheels.yiiwheels', // yiiwheels configuration             ),         'phpthumb' => array(             'class' => 'ext.ephpthumb.ephpthumb',             ),         'session' => array(             'timeout' => 86400,             ),         'user' => array(             'loginurl' => array('admin/login'),             // enable cookie-based authentication             'allowautologin' => true,             'autorenewcookie' => true,             'identitycookie' => array('domain' => 'http://localhost'),             'authtimeout' => 86400,             ),         // uncomment following enable urls in path-format         'mail' => array(             'class' => 'ext.yii-mail.yiimail',             'transporttype' => 'smtp',             'transportoptions' => array(                 'host' => 'localhost',                 'username' => '',                 'password' => '',                 'port' => '25',                 ),             'viewpath' => 'application.views.mail',             ),         'urlmanager' => array(             'urlformat' => 'path',             'showscriptname' => false,             'casesensitive' => false,             'rules' => array(                 '/' => 'admin/',                 'page/<id:[0-9]+>/' => 'page/publicpage',                 'page/<slug:[a-za-z0-9-_\/]+>/' => 'page/view',                 'admin' => 'admin/login',                 '<slug:' . slug_contact_us . '>' => 'page/contact',                 '<controller:\w+>/<id:\d+>' => '<controller>/view',                 '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',                 '<controller:\w+>/<action:\w+>' => '<controller>/<action>',                 ),             ),         // uncomment following use mysql database         'db' => array(             'connectionstring' => 'mysql:host=localhost;dbname=' . $arrconfig['dbname'],             'emulateprepare' => true,             'username' => $arrconfig['dbuser'],             'password' => $arrconfig['dbpass'],             'charset' => 'utf8',             ),         'errorhandler' => array(             // use 'site/error' action display errors             'erroraction' => '/admin/dashboard/error',             ),         'log' => array(             'class' => 'clogrouter',             'routes' => array(                 array(                     'class' => 'cfilelogroute',                     'levels' => 'error, warning',                     ),                 ),             ),         'hybridauth' => array(             'class' => 'ext.widgets.hybridauth.chybridauth',             'enabled' => true, // enable or disable component             'config' => array(                 "base_url" => $siteurl . '/hybridauth/endpoint',                 "providers" => array(                     "google" => array(                         "enabled" => false,                         "keys" => array("id" => "", "secret" => ""),                         ),                     ),                 "debug_mode" => false,                 "debug_file" => "",                 ),         ), //end hybridauth         ), 


can help?
if other information need edit question.

it because app doesn't know module load. need set class refer class of module want load. example :

'modules' => [     'admin' => [         'class' => 'app\modules\admin\module',         'defaultcontroller' => 'admin'     ],     'gii' => [         'class' => 'yii\gii\module',         'allowedips' => ['127.0.0.1', '::1', '192.168.*.*'],     ], ], 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -