Looking for a good CRUD plugin / library (idea?) For codeigniter

Last week, I started developing a CI web application. Since then, I realized that I am repeating my code a little with regard to the processing of adding, deleting and updating rows in my database - for example, model functions such as "delete_invoice", "delete_user" and "delete_job", etc. All of them essentially do the same - delete a row in the database.

So who knows: a) Is it a good idea to just use a generic method for this? b) Are there any good libraries / helpers or something out there for CI. I would rather get a more standard / stable library over something full of crazy features.

Thank! John.

+5
source share
5 answers

This is a very comprehensive CRUD base class class for codeigniter:

https://github.com/jamierumbelow/codeigniter-base-model

+3
source

You can use groqery crud, it’s simple, stable and has many features, such as 1-n to nn ratios, file downloads, automatic fields, callback functions, and many others. You can view the user manual and download it on

http://www.grocerycrud.com

It is very easy to write to this library, and it does not need to copy again and again, similar code, similar models, similar views, similar JavaScript, CSS, etc. You can easily program with a few lines of code, for example

$this->grocery_crud->set_table('customers');
$this->grocery_crud->columns('customerName','phone','addressLine1','creditLimit');

$this->grocery_crud->render();

what is it!

+4
source

, BaseModel , , , , , :

, "delete" BaseModel, :

switch($obj->status){
     case "delete":
         //delete call
     case "update":
         ...

=)

,

0

"- ", ORM DataMapper CodeIgniter . , , , ORM.

http://datamapper.wanwizard.eu/

.

0
0

All Articles