Flaming-Crud: Another CRUD Generator |
[eluser]clip[/eluser]
Firstly I would like to thank dixcoder for the inspiration from his Model/Controller Generator I had also been contemplating throwing something like this together and now that I have done it, I wish I would have done it along time ago. The focus of Flaming-Crud is currently on models only. I have created and successfully used two different models with it now without issue. These were done on my local environment but I don't see why it would work on your host. Here is a quick run down: Quote:Download and unzip the ci_crud.php file and upload to your server. Model Structure: The generated model will have a property created for each field from the db table along with $limit, $offset, and $order_by properties. Code: public $id; //in this example $id is the primary key from our table. Usage: Code: class Some_controller extends Controller Enjoy! Would love to here any feedback anyone may have. Edit: I have made a minor change to how the code is output for returning query->result() and query->row(). Before this change a return of query->result() may have been expected but query->row() was returned instead.
[eluser]minimalistic[/eluser]
Great work man. I've started to use your crud maker and I'm loving it. I'll come back with a complete feedback later on. Vx CI Community - Brazil/Portugal http://www.codeigniter.com.br
[eluser]clip[/eluser]
version 0.1.1 Bugfix: I have made a minor change to how the code is output for returning query->result() and query->row(). Before this change a return of query->result() may have been expected but query->row() was returned instead. Setting the property of the primary_key field will now return query->row() and when it is not set, query->result() will be returned regardless of how many rows are returned.
[eluser]clip[/eluser]
I have just commit v0.1.3 to github. Added the ability to call multiple table joins. Example below. Code: $this->load->model('posts_model'); Get the new version from here.
[eluser]clip[/eluser]
I have added some documentation @ github explaining the methods and properties available for the models generated by flaming-crud.
[eluser]clip[/eluser]
Version 0.1.4 now available at github. Please see the Change Log and Docs for changes. |
Welcome Guest, Not a member yet? Register Sign In |