Folder structure of a PHP MVC framework… am I doing this right?

后端 未结 3 1784
耶瑟儿~
耶瑟儿~ 2020-12-08 12:21

I\'m currently working on my own PHP Framework, and I need some help figuring out if I\'m going in the right direction or not...

The framework is both for my own use

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-08 12:59

    i would suggest you to use a bootstrap.php that manages all the routings so you never run into issues like "i wish i could nest one folder more into my admin module".

    i also wouldnt use modules and keep the default controllers right inside the controller/ dir and the admin controllers inside the controller/admin dir. same for models and views.

    btw its really not clever not to share the models between different parts of your application, they are going to be the same in 99% of all cases. thats why mvc is so powerful. sometimes you even can share some of the view parts inside your app between the front- and backend.

提交回复
热议问题