Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

TimoCuijpers's avatar

TimoCuijpers liked a comment+100 XP

4mos ago

Do not use DB on your controller, since your intention is to have a large number of files, this will cause your controllers to grow faster. My advice is to create a folder Models and fill it all with models, exactly as @jlrdw 's first suggestion.

/app
    /Models
        // other models
        FooModel.php
        BarModel.php

Remember to change namespaces.