承接 tomosia-module/laravel-module-generate 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

tomosia-module/laravel-module-generate

最新稳定版本:v2.1.2

Composer 安装命令:

composer require tomosia-module/laravel-module-generate

包简介

Helps quickly generate common Laravel classes (like Controller, Request, etc.) via Artisan commands

README 文档

README

Laravel Module Generator is a powerful package that helps you quickly generate files within Laravel modules using Artisan commands. This package streamlines your development process and ensures consistent code structure across your modules.

Installation

Install the package via composer:

composer require tomosia-module/laravel-module-generate

Configuration

Publish the package configuration file by running:

php artisan vendor:publish --tag=module-generator

Usage

This package provides Artisan commands to quickly generate files within your Laravel modules. Here are some examples:

Create a new module

php artisan module:create User

This command will create a new module at Modules/User

Create a new container

php artisan container:create User

This command will create a new container at App/Containers/User

Generate Controller

php artisan module:make-controller AuthController --module=User

This command will create a new controller file at Modules/User/Http/Controllers/AuthController.php

Generate Request

php artisan module:make-request LoginRequest --module=User

This command will create a new request file at Modules/User/Http/Requests/LoginRequest.php

Generate Action

php artisan module:make-action StoreAction --container=User

This command will create a new action file at App/Containers/User/Actions/StoreAction.php

Available Commands

  • module:make-controller - Generate a new controller in the module
  • module:make-request - Generate a new request in the module
  • module:make-resource - Generate a new resource in the module
  • module:make-provider - Generate a new provider in the module
  • module:make-action - Generate a new action in the container
  • module:make-model - Generate a new model in the container
  • module:make-scope - Generate a new scope in the container
  • module:make-repository - Generate a new repository in the container
  • module:make-event - Generate a new event in the container
  • module:make-listener - Generate a new listener in the container
  • module:make-notification - Generate a new notification in the container
  • module:make-policy - Generate a new policy in the container
  • module:make-channel - Generate a new channel in the container
  • module:make-job - Generate a new job in the container
  • module:make-mail - Generate a new mail in the container
  • module:make-observer - Generate a new observer in the container

Supports

  • module:make-livewire - Generate a new livewire in the module
  • module:make-data - Generate a new data in the container

Features

  • Quick generation of common Laravel module files
  • Ensures consistent code structure
  • Follows Laravel best practices
  • Customizable templates
  • Easy to extend with new commands

Directory Structure

When using this package, files will be generated following the standard Laravel module structure:

Modules/
└── User/
    ├── Http/
    │   ├── Controllers/
    │   │   └── AuthController.php
    │   └── Requests/
    │       └── LoginRequest.php
    ├── Providers/
    │   └── UserServiceProvider.php
    ├── resources/
    │   ├── assets/
    │   ├── lang/
    │   ├── views/
    │   └── ...
    ├── routes/
    │   └── web.php
    └── ...
App/Containers
└── User/
    ├── Actions/
    │   └── ...
    ├── Events/
    │   └── ...
    ├── Listeners/
    │   └── ...
    ├── Models/
    │   └── ...
    ├── Notifications/
    │   └── ...
    ├── Policies/
    │   └── ...
    ├── Repositories/
    │   └── ...
    ├── Scopes/
    │   └── ...
    └── ...

Contributing

Contributions are welcome! Please feel free to submit a pull request.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-06