Part of the EllisLab Network
   
1 of 32
1
v 1.2.2 grocery CRUD - an automatic Codeigniter CRUD
Posted: 11 April 2011 02:24 AM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  229
Joined  12-18-2010

Codeigniter CRUD - NEW version of grocery CRUD v.1.2.2
Grocery CRUD is a codeigniter CRUD library that makes a php developer’s life easier.
You don’t need so much line of codes, models , views, libraries to make a CRUD works. Just few lines of code and a stable CRUD is ready. You don’t need any codeigniter CRUD tutorial to use it. Even for complex CRUDs you can use it by adding callbacks. You can choose the CRUD template that you want to use by changing only the theme , for now on I have two themes: flexigrid and datatables. You are able to build the grid and the forms easily and automatically by using the power of jquery.

Some features of this CRUD for Codeigniter are:
- automatic creation of the grid and choosing about 2 two themes.
- automatic creation of the forms and the inputs by field type
- quick relation per field
- changing easily themes.
- multilingual functionality
- validation form with the function set_rules same as codeigniter’s
- choosing columns, add fields, edit fields that we want to use in our CRUD
- uploading files
- relation 1 to many (1-n) and many to many (n-n)
- callbacks almost everywhere
- paging, sorting asc, sorting desc, searching by field or search for all with ajax.
...and many others that you can see them from the user guide I created to my personal website.

The version grocery CRUD v.1.2.2 supports Codeigniter 2 (included the new Codeigniter 2.1). You can read the user guide and download the CRUD from the link below.

View user guide and download the CRUD by clicking here.

Grocery CRUD is released with dual licensing, using the GPL v3 and the MIT license. For more read grocery CRUD licence.

A sample code of how a controller will be is the below example (just an example)

if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 
class 
Examples extends CI_Controller {

 
    
function __construct()
    
{
        parent
::__construct();
              
        
$this->load->library('grocery_CRUD');    
    
}
 
    
function customers()
    
{
        $this
->grocery_crud->set_subject('Customer');
        
$this->grocery_crud->set_table('customers');
        
$this->grocery_crud->columns('customerName','phone','addressLine1','creditLimit');
 
        
$output $this->grocery_crud->render();

        
$this->_example_output($output);

    
}

    
function _example_output($output null)
    
{
        $this
->load->view('example.php',$output);    
    
}
 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- grocery CRUD - thread from forum

Profile
 
 
Posted: 11 April 2011 02:49 AM   [ Ignore ]   [ # 1 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1544
Joined  12-20-2010

Wow, nice post. I like the way you name it ‘grocery’ instead ‘e-commerce’(or other e-stuffs), it sounds more simple and friendly smile

 Signature 

“In Code We Trust.”


CI Library : Gas ORM | Proxy

Profile
 
 
Posted: 11 April 2011 02:49 AM   [ Ignore ]   [ # 2 ]  
Grad Student
Avatar
Rank
Total Posts:  38
Joined  02-05-2010

why would i use a crud.. to save some lines of code?

Profile
 
 
Posted: 11 April 2011 04:47 AM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  229
Joined  12-18-2010

Not only to save some lines of codes. CRUDs has lot of similar things. You don’t have to do every time copy-paste thousands lines of codes and views and don’t know what works and what not and test them again and again.
For example if you have a database with 40 tables. It will take a while to create a CMS.
Of course if you want to do more complex things it will take more lines in CRUD of course , but the lines will be more “business logic” lines (more php less html). With the transitional way it will take lot of time to create views, javascripts , html, lot of css , many javascripts errors, bugs etc.

Also is a good solution for those who used scaffolding . Its a quick and easy way to use it in codeigniter 2.0.0

 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- grocery CRUD - thread from forum

Profile
 
 
Posted: 12 April 2011 06:44 AM   [ Ignore ]   [ # 4 ]  
Summer Student
Total Posts:  6
Joined  01-01-2008

Wow!
I’m amazed with the features of the grocery CRUD.
Very nice job indeed.

I developed an administration area in a few hours with it.

Thanks a lot mate! :-D

Profile
 
 
Posted: 12 April 2011 04:01 PM   [ Ignore ]   [ # 5 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  229
Joined  12-18-2010

Thanks :)

 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- grocery CRUD - thread from forum

Profile
 
 
Posted: 16 April 2011 10:12 AM   [ Ignore ]   [ # 6 ]  
Grad Student
Avatar
Rank
Total Posts:  38
Joined  02-05-2010

Alright, I do use alot of the same functions for different tables etc. I will look into it :D thanks for contributing ^^

Profile
 
 
Posted: 16 April 2011 11:12 AM   [ Ignore ]   [ # 7 ]  
Grad Student
Avatar
Rank
Total Posts:  48
Joined  07-14-2007

Decided to try it out but FIY… works fine on 2.0.1 but it seems to be broken on 2.0.2 / Reactor. I am guessing due to changes in system/core/Config.php.

A PHP Error was encountered
Severity
Warning
Message
: include(application/third_party/config/grocery_crud.php[function.include]failed to open streamNo such file or directory
Filename
core/Config.php
Line Number
115

A PHP Error was encountered
Severity
Warning
Message
: include() [function.include]Failed opening 'application/third_party/config/grocery_crud.php' for inclusion (include_path='.:/Applications/MAMP/bin/php5.3/lib/php')
Filenamecore/Config.php
Line Number
115

An Error Was Encountered
Your application
/third_party/config/grocery_crud.php file does not appear to contain a valid configuration array. 

Haven’t yet figured out where to edit to fix.

 Signature 

feedbleed.com - Saving music… one download at a time.
mmmmail.com - Disposable Email to RSS service.

Profile
 
 
Posted: 16 April 2011 12:01 PM   [ Ignore ]   [ # 8 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  229
Joined  12-18-2010

Actually codeigniter 2.0.2 is a little bit buggy I think!
I will check why this error is happening.
Thank you for the advice.

 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- grocery CRUD - thread from forum

Profile
 
 
Posted: 16 April 2011 03:07 PM   [ Ignore ]   [ # 9 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  229
Joined  12-18-2010

Ok actually is not a simple change for me. So I renamed the “for codeigniter CI 2.0.x” and I made it “for codeigniter CI 2.0.1”. Of course and the codeigniter CI 2.0.0 users are able to use it.
Probably I will fix a patch or a new tag for codeigniter 2.0.2 .
Thanks

 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- grocery CRUD - thread from forum

Profile
 
 
Posted: 17 April 2011 06:14 AM   [ Ignore ]   [ # 10 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  265
Joined  03-30-2009

ah man!  I just downloaded gcrud and now i can’t use it :-((  oh well.. let us know when you are 2.0.2 compatible.  thanks for the contribution!

 Signature 

http://rjjohnston.me

Profile
 
 
   
1 of 32
1