7

Is there any thing in PHP to create basic scaffold, like in Rails?

EDIT: I need something to prototype quickly..

Akshay
  • 11,803
  • 5
  • 29
  • 26
  • Create your own Scaffold with PHP by this example [php-scaffold-template](https://github.com/prod3v3loper/php-scaffold-template), all you have to do is empty the folder templates and add your own template. The code should also be understandable to expand – prod3v3loper Jan 27 '21 at 11:24

11 Answers11

7

Some frameworks like Symfony, CakePHP, Akelos, CodeIgniter and others have support for scaffolding.

However if you don't want to use a framework you can try phpScaffold which generates CRUD scaffold pages based on phpMyAdmin table exports...

Christian C. Salvadó
  • 807,428
  • 183
  • 922
  • 838
  • thanks.. phpScaffold is almost what i was looking for. – Akshay Jan 10 '09 at 11:42
  • 5
    _scaffolding_ is deprecated in **CodeIgniter** – Anyul Rivas Feb 23 '11 at 02:52
  • The PHPScaffold download works very well for lightweight simple crud builds. – madcolor Apr 10 '11 at 22:31
  • phpScaffold is upgraded on https://github.com/tute/phpscaffold. It's first programmer gave me the permission to publish it, I don't know why doesn't he use the new version, or link to it from his website. Github's version has many improvements. – TuteC May 15 '11 at 03:39
6

I also wanted some fast prototyping, but I wanted it to generate the code, so it's easy to update it. I made many improvements on phpScaffold (HTML5, nice CSS, many models at once, etc) which are published on http://github.com/tute/phpscaffold.

TuteC
  • 4,342
  • 30
  • 40
3

Phreeze makes this simple and easy. http://phreeze.com/

mmcachran
  • 474
  • 2
  • 8
2

CakePHP got plenty of scaffolding options

If you throw Crud + API plugin on top, you basically got everything you need, with tons of nice additions

cakephp-crud: The active successor of the two projects below. Provides both Crud actions, API, Scaffolding, Searches and more

Crud Plugin: https://github.com/nodesagency/Platform-Crud-Plugin

API Plugin: https://github.com/nodesagency/Platform-API-plugin

They all utilize CakePHP events, so its really simple to extend and modify the default behavior

Jippi
  • 76
  • 4
2

QCodo is another great option. And since it uses reflection to do Code Generation instead of reflection at runtime, you'll likely see better performance.

CaseySoftware
  • 3,105
  • 20
  • 18
2

First, Rails is a framework. PHP is a language. PHP does not have built-in scaffolding support, just as Ruby--the language Rails is build on--does not. A framework like CakePHP, however, does support scaffolding.

Second, I see that you raised an objection to CakePHP because "you still have to do a bunch of stuff." That's true--with any framework, you're going to have to learn new conventions, configurations etc.

Lucas Oman
  • 15,597
  • 2
  • 44
  • 45
  • Maybe the language of question was not perfect, but basic intent was just to find something that will generate basic scaffold _in_ php code; just like rails scaffold generator does. Not that i'm opposed to learning a new framework, but currently i just needed that just generates basic scaffold. Thx. – Akshay Jan 09 '09 at 15:34
1

If you use CakePHP as the web framework it supports scafalding. See this link for more info. http://book.cakephp.org/2.0/en/controllers/scaffolding.html

Victor Sergienko
  • 13,115
  • 3
  • 57
  • 91
Jared
  • 39,513
  • 29
  • 110
  • 145
1

This was asked quite some time ago, but if it's still relevant check out this nice scaffolding class (check the demo)

Eran Galperin
  • 86,251
  • 24
  • 115
  • 132
1

For myslef I Use CodeIniter for development, sure they have scaffolding, but only in terms of a "simple scaffolding" which mean you're not gonna use it in live product (i dunno about everyone but i'm only using it as some tools) .

but if you need some like CRUD generator you can use SparkPlug , or Ignition both of them can be used on Codeigniter

ibnu triyono
  • 223
  • 1
  • 8
1

Yiiframework has a good code scaffolding system called Gii. It's web based. Once you create the tables, you can generate the CRUD classes from within the browser. No command line needed. I like this scaffolding.

0

I'm not sure what the SO policy is for dead thread revival but I figured I would add my own two cents in case none of the above solutions were satisfactory. If you're looking for a PHP-based MySQL scaffolding tool, check out AMPLE Scaffolder. The entire package is contained within a single PHP file (less than 200k) that can simply be dropped into a web accessible directory whereupon you have immediate access to local and remote MySQL databases based on the internal database permissions. No schema exporting, configuration files, or other hassles. Plus, there's a whole lot of other capabilities to offer as well. Just thought I'd share it in case you were looking for another option. Feel free to check it out and post feedback if you have any questions.

demongolem
  • 9,474
  • 36
  • 90
  • 105