有没有好的 PHP CRUD 代码生成器?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3244457/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 09:07:12  来源:igfitidea点击:

is there a good PHP CRUD code generator?

phpdatabasecrud

提问by BlueBird

Is there any better PHP CRUD code generator?
I want to get Data Access Object, Business Object and Value Object.
It would be difficult to match my needs, but I am happy at least I can get any relevant one.

有没有更好的 PHP CRUD 代码生成器?
我想获取数据访问对象、业务对象和值对象。
很难满足我的需求,但我很高兴至少我能得到任何相关的。

[EDIT]

[编辑]

I am working on an MVC based application.
I am using my own MVC framework.
I need this code generator to generate codes for MODEL part.
For example Entity Class and Value Objects Currently my codes are like below.

我正在开发基于 MVC 的应用程序。
我正在使用我自己的 MVC 框架。
我需要这个代码生成器来为 MODEL 部分生成代码。
例如实体类和值对象目前我的代码如下。

class CustomersDAO
{
   public function add() {$CustomersVO}
   public function update($CustomersVO) {}
   public function delete() {}
   public function get() {}
}
class CustomersVO
{
   public $id;
   public $name;
   public $tp;
   public $address;
}
class CustomerBO
{
   private $id;
   private $name;
   private $tp;
   private $address;

   public function getID() {};
   public function setID($val) {};
   // other getters and setters gos here..

   // other business logics
}

回答by Kieran Allen

http://www.cakephp.org(scaffholding)

http://www.cakephp.org(脚手架)

http://www.symfony-project.org

http://www.symfony-project.org

http://www.phpscaffold.com

http://www.phpscaffold.com

http://www.scriptcase.net

http://www.scriptcase.net

all can generate the basic business logic via command line.

都可以通过命令行生成基本的业务逻辑。

回答by Web Developer in Pune

LaraAdmincould be the best CRUD Generator and Admin Panel for Laravel. Its also generates Eloquent Models and Spectacular Views.

LaraAdmin可能是Laravel最好的 CRUD 生成器和管理面板。它还生成雄辩的模型和壮观的景色。

回答by appbird

You may have a look at

你可能看看

Cygnite Framework

Cygnite 框架

Does basic code generation. Controller, model, views, layout, pagination, form component, required field validation etc. all these generate with simple command. You may alter the code based on your need.

进行基本的代码生成。控制器、模型、视图、布局、分页、表单组件、必填字段验证等所有这些都通过简单的命令生成。您可以根据需要更改代码。

Here is the tutorial- Generate CRUD application within 2 Min

这是教程 -在 2 分钟内生成 CRUD 应用程序

Worth looking.

值得一看。

回答by sbrbot

You can find yet another PHP DAO generator/scaffolder - this one does not require manual configuration or table/columns settigs - it will read database schema structure from MySQL's INFORMATION_SCHEMA and automatically create ORM classes for selected tables with properties, CRUD(S) and finder functions, including getters for related objects.

你可以找到另一个 PHP DAO 生成器/脚手架——这个不需要手动配置或表/列设置——它会从 MySQL 的 INFORMATION_SCHEMA 读取数据库模式结构,并自动为选定的表创建 ORM 类,包括属性、CRUD(S) 和 finder函数,包括相关对象的 getter。

http://phpdao.ir.com.hr

http://phpdao.ir.com.hr