laztopaz/laracrud 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

laztopaz/laracrud

Composer 安装命令:

composer create-project laztopaz/laracrud

包简介

This package is to help developers quickly create crud on laravel models.

README 文档

README

Generate a full CRUD ready to deploy application from your console

Documentation

What this project currently does

  • Let you interactively define your database schema
  • Generate a fresh model into your app/Models folder and let you specify your default path.
    • It helps you generate the $fillables, and the $casts arrays to your model
  • Generate a migration file for you.

The main objective of the project is to help generate a working CRUD app based on your model definition.

Future updates would automatically;

  • Generate a seeder class and factory for you. And you can decide not to generate it based on setting an optional parameter
  • Generate routes
  • Generate validation class
  • Controllers
  • views

Installation

  • Go to the release page and download the laracrud binary
  • Move it to the sudo mv path/to/laracrud /usr/local/bin/ to run it as a root all the time
  • Give it permission sudo chmod 755 /usr/local/bin/laracrud to make it executable
  • We need to let bash know where the executable file is nano ~/.bash_profile

Add this line below to bash_profile and save

  • alias generator="php /usr/local/bin/laracrud"

Then run this command:

  • source ~/.bash_profile

Finally, you can type generator make:crud ModelName or laracrud make:crud ModelName in your terminal. You should see the below screen.

alt text

How to use

  • From your terminal, navigate to your current Laravel project directory and type laracrud or the alias you've provided in the bash profile.

  • --m=[create|update] can be passed to the command if you want a new migration file, or you just want to update the existing schema.

  • --g=[model|migration] can also be passed to the command in case you only want to generate either a model or a migration. Without passing this parameter, the default mode will generate both model and migration files.

  • --f=[folder path] You can optionally pass it, if your model folder is not in app/Models. Otherwise, it will create or append the new file to the app/Models folder

  • --mf=[string] You can optionally pass it to give your migration file a meaningful name

  • --d You can dump the file content without first writing them to file

Supported Field Types

  • This project supports all Laravel migration column types
  • The default column type is string. Therefore, you can hit the return key if you do not want to change the type.
  • For string and integer field type, you can also omit the length so that it will use the default length.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-08-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固