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.


Messages In This Thread
CodeIgniter 2.0 Code Generator - by El Forum - 03-07-2011, 01:17 AM
CodeIgniter 2.0 Code Generator - by El Forum - 01-02-2014, 04:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB