Scaffold library for PHP Code Igniter framework.
Version 0.91 released.
Introduction
CI-Scaffold generates files based on a pre-defined template, that can be changed to generate it the way you think better.
Usage
You must extract the zip file at system/application/libraries folder and use it as a Code Igniter Library.
You must create a Controller that calls the Scaffold generate method like this:
<?php
class Admin extends Controller {
public function __construct(){
parent::__construct();
}
public function index(){
$this->load->library('scaffold');
$this->scaffold->generate();
}
}
This Controller will list your tables to you select one.
Submiting the table will generate scaffold files for this.
At this example I selected the table "estado". All files necessary to "estado" crud works was generated by CI-scaffold.
Features
Features:
- MySQL and PostgreSQL drivers for showing tables and get table fields to generate scaffold;
- Generating MVC for list, create, update, delete table data;
- Files content based on templates that can be changed;
This can't be so!
Your code refers to scaffold but the downloaded example refers to scaffolder.
Besides your code as shipped generates errors with the name change. There is no excuse for this carelessness!
What do you really mean?
@archbro: May be you are right about the mistake, but I think nothing gives you right to express in that way. Should be enough to point the bug, I'm sure the author will make the corrections asap.
relax. creating a simple line of code, sometimes, takes hours. so be careful with your words and show some respect.
Hello, thanks for make this libraries. I'm newbie here. I have extracted it, into application/libraries/ (because it has been moved from system folder) and i got this error:
A PHP Error was encountered Severity: Notice Message: Undefined variable: db Filename: drivers/driver.php Line Number: 38 A PHP Error was encountered Severity: Warning Message: require(.php) [function.require]: failed to open stream: No such file or directory Filename: drivers/driver.php Line Number: 39
Fatal error: require() [function.require]: Failed opening required '.php' (include_path='.;C:\php5\pear') in C:\wamp\www\simrs\application\libraries\scaffolder\drivers\driver.php on line 39
What should i do bro? Thanks if u would like to reply..
Any improvement for this bug? It also tells me some kind of error regarding the name.
Hi, I was integrating your library and I have the next error:
A PHP Error was encountered
Severity: Warning
Message: require_once(application/libraries/scaffolder/scaffolder.php) [function.require-once]: failed to open stream: No such file or directory
Filename: libraries/Scaffold.php
Line Number: 18
Fatal error: require_once() [function.require]: Failed opening required 'application/libraries/scaffolder/scaffolder.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\webAdministrator\system\libraries\Scaffold.php on line 18