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:
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
2. After that we have to change database setting in application/config/database.php
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:
Next we wil go to the main screen, where we can see the 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.
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
– Controller
– Create form
– List form
– Header
– 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:
On clicking the “create” link, it will go to create form
Once created we will see the list as below:
28,339 total views, 1 views today
August 31, 2015 at 6:16 am
This site was… how do you say it? Relevant!!
Finally I’ve found something that helped me. Cheers!
September 2, 2015 at 4:36 pm
Hello friend, very very very good tutorial, congratulations.
There is still one that works with version 3.0 of the IC?
April 4, 2016 at 3:20 pm
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