Class not found

Hi! I’m making my first application using Yii and I have the next code:

public function actionCreate()


    $model = new User();

    $singUp = new \frontend\models\SingupForm;

And I’m having the next error message when I try to go to that method:

Class ‘frontend\models\SingupForm’ not found

But I have the file saved on the directory as it is showed in the screenshot I attached. Additionally I added all the models folder of the Frontend on the controller I am using:

use \frontend\models;

So I don’t know what I’m doing wrong. Please help ::)


It is called SignupForm not SingupForm.

Also when using the "use" statement, try it without the first backslash:

use frontend\models\SingupForm;

Also please check if the namespace in the "SignupForm" is set correctly.

Open the SignupForm and verify this:

namespace frontend\models;

class SignupForm extends ActiveRecord



I would suggest you to read some tutorials on PHP Namespacing and how it works. :)


OMG!! you don’t have any idea of how many times I checked the spelling. I think I needed more coffee last night. Thank you so much!! and I’ll read about it for sure