Where to put custom class files

hello, so if I was using a custom class where would I put the file for it so that Yii would pick it up when I use it’s namespace?

So I know that controlers will be put in the controlers directory, views in the view, models in model… and custom classes?

Or do I have to use a require when I want to load it?

Just follow the namespace already implemented and Yii autoloader will do the rest. For example your class is ‘MyClass’ and you want to place it in ‘abitcrazy’ folder. Check sample controller’s namespace - if it’s ‘app/controllers/xxxx’ put the ‘abitcrazy’ folder next to ‘controllers’ and use namespace ‘app/abitcrazy’ ;)

Thank you!

Been a while since I have worked in Yii2 and have forgotten everything! LOL