CodeIgniter Forums
Models in Subfolder? Namespace? - Printable Version

+- CodeIgniter Forums (
+-- Forum: CodeIgniter 4 (
+--- Forum: CodeIgniter 4 Support (
+--- Thread: Models in Subfolder? Namespace? (/showthread.php?tid=75065)

Models in Subfolder? Namespace? - IVIike - 12-16-2019

I'm facing the problem that I have a lot of models and I want to organize them into subfolder. But when I create subfolder and change the namespaces accordingly, the models are not found anymore. It does only work if they are located in the "root Models" folder..

What could be the problem here? Anybody else having this problem or a solution for this?

RE: Models in Subfolder? Namespace? - IVIike - 12-16-2019

it seems to be a problem with my IDE (PHPStorm) when drag&drop-ing the models into the Subfolder. Creating the classes with "right click -> new PHP class" on the subfolder does work as expected..

I dont know exactly what the problem is/was. But after creating it that way it works.

RE: Models in Subfolder? Namespace? - InsiteFX - 12-16-2019

It has to do with phpStrom and refactoring making it to slow.

It has been asked to add it but I do not think that they will.