Tcalp
(Tcalp)
1
I am developing two applications (admin / frontend).
As you can imagine I have something like:
-
admin
-
protected
-
config
-
controllers
-
components
-
models
-
etc…
-
frontend
-
protected
-
config
-
controllers
-
components
-
models
-
etc…
I would like to also have
In my application config, how would I go about including something like
‘import’ => array(
‘application.parentdirectory.common.models.*’,
yiismart
(Yiismart2012)
2
Just my opinion. Create a module for your admin app.
Tcalp
(Tcalp)
3
Figured it out.
In my main.php I put :
Yii::setPathOfAlias('common', dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'common');
so I can now reference ‘common.models.*’