I am trying to get some more structure in my app by moving some models in subdirectories.
Currently my app structure is
- app/controllers
- app/models
- app/views
I have done so for my controllers already without any issue.
When (in a controller) I try to call a model in a subdirectory (eg.: $model = new \Directory\ModelName() ) f3 throws a class not found error. (If I put ModelName.php directly in the root of the model directory it works fine using $model = new ModelName() ).
My config.ini file shows
AUTOLOAD=app/controllers/|app/models/
Shouldn't this just work out of the box?
What could be wrong?