Welcome Guest, Not a member yet? Register   Sign In
Model and Controller Generotor for CI
#1

[eluser]imn.codeartist[/eluser]
Dear CI friends,

Please find the attached file of CodeIgniter Model and Controller Generator.

Its simple and very easy to use.

At the moment it only supports Php Mysql.


Steps to use:

1) download generator.zip file and extract in your htdocs.

2) There will be index.php and once you run it, it will ask for hostname, username, password, database name and so on.

3) Once you finish, click on the generate button then it will create a folder of your database name and there will be 2 folders controller and models, you can find generated models and controllers over there.

4) copy them and place in your codeigniter application and use them.

5) You are done.

Any comments are welcome or you can email me for more information.

Regards
Dixanta Shrestha
[email protected]
#2

[eluser]gawronzo[/eluser]
Hi Dixcoder!

Thanx for nice upload. It works fine. I looked for something like this. Script generates only clean CRUD objects. What do you think about adding getters and setters? And about moving
Code:
$this->load->view('');
from controller constructor to index function?

You should change line 50 to:

Code:
<?php
#3

[eluser]imn.codeartist[/eluser]
Hi, thanks for your interest.At the moment I am focusing on generating models.

During the time of creating I also generate controllers as well for making easy. Soon I will update them as I have just released the first version.
#4

[eluser]cliffoliveira[/eluser]
interesting
I'm really looking for such a service that helps in the creation of CRUD and Models in general
I do a test and wait for progress
grateful
#5

[eluser]Jônatan fróes[/eluser]
I'll try.
Thanks for sharing!
#6

[eluser]Unknown[/eluser]
Thanks dixcoder, I started to modify it a little.. I start with a little bit different setup using jQuery Pagination and the Authentication Library...

I have modified the creator so that it will create all files needed to perform basic table functions. The Model, View, and controller are created. Views are placed in their own directories IE: /view/<table_name>/index.php, add.php, edit.php etc...

I will gladly post if you like?
#7

[eluser]Unknown[/eluser]
I keep getting the following errors:

Code:
PHP Warning:  mysql_fetch_array() expects parameter 1 to be resource, boolean given in /path/to/generator/index.php on line 122

PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in /path/to/generator/index.php on line 164

PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /path/to/generator/index.php on line 165




Theme © iAndrew 2016 - Forum software by © MyBB