O
O
Ordinary Man2015-02-21 21:31:19
CodeIgniter
Ordinary Man, 2015-02-21 21:31:19

Is it necessary to use models when developing in CodeIgniter?

Good day!
I'm trying to master the CodeIgniter framework and develop a small application for myself and my project. In the process of reading the documentation, the question arose: is it necessary to use models in development? Or can you do without them?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vitaly Kamelin, 2015-03-25
@turboGadjet

You can extend the regular model and provide methods get($id), save($data), update($id, $data), delete($id) in it. Simplifies and speeds up the work on the project. How to expand is in the docks.

S
Saboteur, 2015-02-21
@saboteur_kiev

If it is PURE for yourself, you need to rivet something to make it work - you can do it without models and without CI.
But if the task is to "master the framework", then of course you should use best practice when developing, otherwise why master the framework incorrectly?

R
Rikcon, 2015-02-21
@Rikcon

Models in Codeigniter are the saddest models I've ever seen, I don't know if they can be called that in the world of modern php.
Here is Eloquent (Laravel) Here are the models.
And in the codeigniter - just a class in which you add methods for working with the database.
++ My advice to you, CI is dead and will never be alive again, they released version 3.0 xs why.
Switch to a more popular framework (Laravel, Yii2 + a bunch of others).

M
Maxim Kudryavtsev, 2015-02-21
@kumaxim

CI is dead, don't touch the bones. Learn Yii.
If you really want CI, pay attention to Bonfire.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question