terranc/lf-generator

Laravel 5 仓库/模型生成器。

1.0.1 2019-08-02 03:49 UTC

This package is not auto-updated.

Last update: 2024-09-17 03:56:54 UTC


README

安装

步骤 1

composer install terranc/lf-generator --dev

步骤 2

将以下代码添加到您的 app/Providers/AppServiceProvider.php 文件中,在 root() 方法内

if ($this->app->environment() == 'local') {
  $this->app->register(\Lookfeel\Boilerplate\GeneratorCommandServiceProvider::class);
}

使用方法

php artisan app:xxx
 app
  app:attribute        Create a new attribute traits for model
  app:model            Create a new Eloquent model class with attribute, relationship and scope traits
  app:name             Set the application namespace
  app:relationship     Create a new relationship traits for model
  app:repository       Create a new repository class
  app:scope            Create a new scope traits for model
  app:service          Create a new service class

链接

hariadi/laravel-boilerplate-generator