Moving from CI3 - 4 |
Hello !
Here are some advices I would give you: 1/ I won't use things like "$this->uri->segment(3)", instead i would use routes definition: https://codeigniter4.github.io/userguide...aceholders 2/ I would use a model, yes. In CI3, I found it complicated, but in CI4 it is super easy: https://codeigniter4.github.io/userguide...your-model So, I would use routes placeholders to manage incoming requests, create a "BeerModel" to interact with the database (and fetch the content), use the controller to manage all this and send the result to the view. Please note that CI4 use a different way to load views: https://codeigniter4.github.io/userguide...ing-a-view |
Messages In This Thread |
Moving from CI3 - 4 - by danbriant - 02-02-2020, 12:54 AM
RE: Moving from CI3 - 4 - by littlej - 02-02-2020, 01:33 AM
|