Download the PHP package chujc/laravel-generator without Composer

On this page you can find all versions of the php package chujc/laravel-generator. 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 laravel-generator

Laravel & Lumen 脚手架

自动生成model文件,RESTful路由以及对于的controller,request文件

安装

因为是开发环境下使用的包,请执行如下方式安装,不要省略--dev参数

Laravel 5.5以上版本安装后就可以执行命令生成对应的文件,Lumen需要在bootstrap/app.php 文件下面 末端加入如下代码

生成model文件

使用前请确保您的数据库文件是配置正确的,同时您的数据表已经构建,因为此包生成的model是会读取您的表结构生产对应的model

自动扫描数据库结构,为目前的所有表生成model文件,如果使用到了软删除,创建,更新字段请最好使用timestamp类型 字段名称可以在配置文件中配置,其他不限。

models 脚手架

为指定的生成model文件

单个表生成的时候,请注意不需要带上表前缀, 其余与表名一致

如果您的项目安装了barryvdh/laravel-ide-helperdoctrine/dbal,还会自动调用对应的命令为您生成model class的注释

生成API Controller文件

API脚手架

命令

api 只能单个生成,需要注意controller 命名

关联model生成controller会关联model文件,生成request文件,常用方法的基本使用, RESTful路由

注意-m 后面的model 一定是存在model配置文件夹中的 model,命名需与文件中一致

路由

生成的route放在配置的文件中,你可以直接修改配置文件或者在引入路由文件

修改路由的主要原因是生成的controller文件等是完全可以自定义配置的,如果你不想修改可以配置成官方的路径 配置文件中apiDefault 修改成对应的配置既可

laravel中可以直接在app\Providers\RouteServiceProvider 中 新增或者修改对应的访问引入route文件

lumen可以直接在bootstrap/app.php下面修改

配置相关

很多如果您很多需要自定义,比如model,controller放置文件夹等,请先执行以下命令生成配置文件。

后续版本规划

此包的开发是方便大家在项目中快速构建对应的接口,如果您对功能的新增、修改有建议,希望发邮件到john1668#qq.com 邮箱(#需要替换为@)或者 直接issues


All versions of laravel-generator with dependencies

PHP Build Version
Package Version
Requires php Version >=7
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 chujc/laravel-generator contains the following files

Loading the files please wait ....