CIIG | codeigniter CRUD generator

CIIG or codeigniter-ignator is codeigniter crud generator from database, which will simplify developer’s job who uses codeigniter framework.
We all know that codeigniter is one of the best light weight developer friendly framework for PHP.
Have you ever thought of creating an automatic form in codeigniter?

Here I have narrated a simple way to use this small application which can generate forms / CRUD generator for codeigniter.

Now let us see how this application can be used to generate a form.

As a developer we all know for creating an application we have to setup a database first. Once you have designed the database and the tables, you can download this codeigniter scaffolding (CRUD generator).

You can either download from github or from this blog.

Once downloaded you will get a zip folder which on extracting you will get a folder with following files:

codeigniter crud generator

codeigniter crud generator

After extracting, you need to make the following changes:
1. We have to change the config file base url in codeignator application/config/config.php

ciig - config path change

ciig – config path change

ciig-baseurl-change

ciig-baseurl-change



2. After that we have to change database setting in application/config/database.php

ciig_database_change

3. Before changing the database I am going to create a new database and a few tables inside that. The table create will look like as below:

ciig-table-structure

Next we wil go to the main screen, where we can see the ciig crud generator form.

ciig-crud-generator-form



After that we need to give our table name here on table name text field., like that we will give the controller name and form title too.

sample_ciig-form sample

Once we click on submit it will show 5 text boxes with PHP code.
– Model – (Here sample_table_model.php )
– Controller – (sample_table.php)
– List Form – (list_sample_table.php)
– Create Form – ( create_sample_table.php)
– Header structure – (header.php)
– Footer – (footer.php)

Model

ciig-model

Controller

ciig-controller

Create form

ciig-create-form

List form

ciig-list-form

Header

ciig-header-form

footer

ciig-footer

We can copy and past this into the files with correct name as mentioned on that page or we can click download to get a zip folder.

Once downloaded, copy and past this into the controller, model and view folders we can access it from URL:
In our example http://localhost/ciig/index.php/sample_table

The page will look like as below:

ciig-sample-page

ciig-sample-page

On clicking the “create” link, it will go to create form

ciig-create_form_camples

Once created we will see the list as below:

ciig-sample-list-data

8,186 total views, 13 views today

3 Comments

  1. This site was… how do you say it? Relevant!!
    Finally I’ve found something that helped me. Cheers!

  2. Hello friend, very very very good tutorial, congratulations.
    There is still one that works with version 3.0 of the IC?

  3. Hi there! Would you mind if I share your blog with my myspace group? There’s a lot of people that I think would really appreciate your content. Please let me know. Many thanks eaeecdgkkdde

Leave a Reply

Your email address will not be published.

*

© 2017 shabeeb Blog

Theme by Anders NorénUp ↑