Download the PHP package chesterlyd/code-generate-tp-vuetify without Composer

On this page you can find all versions of the php package chesterlyd/code-generate-tp-vuetify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package code-generate-tp-vuetify

代码生成工具(适用于 Vue)

代码生成工具主要用于生成后端开发中简单的增删改查代码,复杂的逻辑还需自己实现,不过你无须担心,我们通过简单的封装简化了开发流程,即便你是新手,也可以写出出色的代码。

工具基于 ThinkPHP 5.1 开发。

此版本前端使用 iview-admin 作为 UI 组件库,配置完善之后会向 yapi 中自动写入文档。

安装

生成工具的开启

项目根目录下运行 php think generate 命令即可;开发期间根目录下生成的 generate.lock 不可删除。

框架说明

框架核心功能为代码生成;主要分为两个大的模块,即前台,后台;目前数据库的操作均为 ThinkPHP 5.0 中的模型方式。

关于性能

为了优化查询性能,默认全部的数据库查询走缓存方式,当然,你也可以在控制器中自己选择是否开启;对此也解决了在执行数据库的增,改,删操作的时候,缓存也会即时刷新,前提是你必须使用 model 的方式。

如何使用

操作之前请先完善数据表,以下全部操作都是基于数据表的字段。

名词解释

开启生成工具

在项目根目录执行以下命令:

执行完毕后访问项目域名/generate即可。

配置文件

  1. view_root生成 vue 文件的存放目录,使用绝对路径。
  2. api_token yapi 中此项目的 token,获取方式:登录 yapi 后打开此项目,选择设置/token配置
  3. api_uri yapi 地址,如http://api.qwangluo.net/

选项说明

此章节针对生成工具界面上的选项进行简单说明

关于生成文档

在正确配置env.php中的内容后,生成前台时如果选择生成控制器,则会同时向 yapi 中写入文档,文档根据生成时配置的允许的操作 名称 操作 必填等内容进行,文档中已有的接口不会被覆盖,统一生成到临时分类中,请自行调整分类并检查文档是否正确。

生成内容

数据库相关操作均使用 ThinkPHP 5.0 的模型操作,具体参考 ThinkPHP 5.0 文档

后台

前台

模型

当前版本生成的模型,全部位于\app\common\model,前后台使用统一的模型类。具体属性含义,请参考模型内注释和 ThinkPHP 5.0 文档。

前台接口

默认提供四个接口,路径一致,通过请求方式和参数进行区分,不影响自定义的方法,详见下方表格:

地址 请求方式 响应方法 备注
/app/控制器/index get get 查询。传入 id 时返回详情,字段按照$detailField定义的返回;
否则返回列表,字段按照$indexField 定义的返回。
/app/控制器/index post post 新增
/app/控制器/index put put 修改
/app/控制器/index delete delete 删除

数据返回

目前工具封装了统一的返回方法,位于\Generate\Traits\JsonReturn,提供了以下方法

项目上线

参考文档


All versions of code-generate-tp-vuetify with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
ext-json Version *
ext-mbstring Version *
topthink/framework Version 5.1.*
guzzlehttp/guzzle Version ^7.0.1
firebase/php-jwt Version ^5.5
topthink/think-migration Version 2.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chesterlyd/code-generate-tp-vuetify contains the following files

Loading the files please wait ....