Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter 2.0 Code Generator
#1

[eluser]KDR1245[/eluser]
Hello everyone,

I have finally got around to creating a code generator for CodeIgniter 2.0. This is my very first time creating anything to be used in the command line and it has been a good experience.

UPDATE: now you're allowed to created controllers and models in subfolders..
e.g. php generate c admin/dashboard index login logout

How to install:
1. download the .zip file and extract it in ./application/third_party
2. open command line and navigate to the third_party folder (for windows users: from the thid_party folder hold shift and right click in an empty area > open command window here)
3. type php generate help for a list of commands you can call

Usage (controller):
Code:
php generate controller blog index view
OR
php generate c blog index view

which will generate:
./application/controllers/blog.php (with index and view functions)
./application/views/blog/index.php
./application/views/blog/view.php


Usage (model):
Code:
php generate model blog_model get_all_posts get_post
OR
php generate m blog_model get_all_posts get_post

which will generate:
./application/models/blog_model.php (with get_all_posts and get_post functions)

Usage (library):
Code:
php generate library auth check login logout
OR
php generate l auth check login logout

which will generate:
./application/libraries/Auth.php (with check, login and logout functions)

Usage (helper):
Code:
php generate helper links blog_post_link
OR
php generate h links blog_post_link

which will generate:
./application/helpers/links.php (with blog_post_link function)


I think CodeIgniter really needs a code generator for faster developement.
Let me know what you guys think of it.


Download CI 2 Code Generator

Thanks,
Maikel.
#2

[eluser]Nisha S.[/eluser]
I would like to introduce another Code Generator for CodeIgniter which includes many advanced features like role based authentication, search with pagination file based caching etc. The generator is web based and available at www.thephpcode.com




Theme © iAndrew 2016 - Forum software by © MyBB