nrz/laravel-module-creator

构建您的Laravel模块的工具

dev-master 2023-02-26 17:17 UTC

This package is not auto-updated.

Last update: 2024-10-03 00:00:18 UTC


README

Laravel包,从模板创建Laravel模块

要求

Laravel 9和PHP 8.0

安装

您可以通过composer安装此包

composer require Nrz/laravel-module-creator

用法

首先,您必须创建您的模块

php artisan module:make Roocket/User

最后,运行此代码

composer update

完美完成

您的模块命令

您有不同的命令来处理您的模块

    php artisan

您可以看到这些命令以供您使用

 module
  module:make                   create a new module to develop project
  module:make:controller        Create a new controller class for module
  module:make:graphql-mutation  Create a new Graphql Mutation class for the module
  module:make:graphql-query     Create a new Graphql Query class for the module
  module:make:graphql-type      Create a new Graphql Type class for the module
  module:make:migration         Create a new migration file for the module
  module:make:model             Create a new Eloquent model class for module
  module:make:repo              Create a new repo class for the module
  module:make:seeder            Create a new Seeder class for module
  module:make:rule              Create a new Rule Validation class for module
  module:make:event             Create a new Event class for the module
  module:make:listener            Create a new Listener class for module

您可以为您的模块构建模型,例如

php artisan module:make:model <module-namespace> <model-name>
php artisan module:make:model Roocket/user User