Model Directory


I would like to load Model from directories in model

It’s a god when my model is in model directory:


and i make this with:

but how can I make this when my model is in for example:protected\models\somethingfolder\ ?

please help

If you want to make the directory available system wide, update the imports in your config file:

	// autoloading model and component classes





If you only use the class in specific places, you can import it before you first use it:


// Or Yii::import('application.models.somethingfolder.*');

$somethingModel = new SomethingModel;

Thank you :)

hey, it is amazing, thanks