luchavez/boilerplate-generator
Composer 安装命令:
composer require luchavez/boilerplate-generator
包简介
A boilerplate generator for building packages and implementing DDD on Laravel 8|9|10.
README 文档
README
If you're developing a Laravel app, you know how quickly it can grow and become complex. You don't want to end up with a messy codebase that's hard to maintain and debug. You need a way to organize your code into modular and reusable packages and domains that imitates the Domain-Driven Design (DDD) principles.
That's where luchavez/boilerplate-generator comes in handy. It's a Laravel package that helps you create, manage, and publish your own packages and domains with ease. It also provides a set of handy commands to generate common classes such as controllers, models, casts, components, and more.
With luchavez/boilerplate-generator, you can keep your Laravel app clean, structured, and scalable. You can also share your packages with the world or use them in other projects. It's the ultimate tool for Laravel developers who want to level up their skills and productivity.
Installation
composer require luchavez/boilerplate-generator -W --dev
// Execute a series of necessary steps to utilize the package
php artisan bg:install
// Publish env variables from packages and domains to the `.env` file
php artisan bg:env:publish --all
Usage
List of bg:package commands
| Name | Command | Description |
|---|---|---|
| Package List | bg:package:list |
List all locally installed packages. |
| Package Create | bg:package:create |
Create a new Laravel package. |
| Package Remove | bg:package:remove |
Remove a Laravel package. |
| Package Enable | bg:package:enable |
Enable a Laravel package. |
| Package Disable | bg:package:disable |
Disable a Laravel package. |
| Package Clone | bg:package:clone |
Clone a Laravel package using Git. |
| Package Publish | bg:package:publish |
Publish a Laravel package using Git. |
List of bg:domain commands
| Name | Command | Description |
|---|---|---|
| Domain List | bg:domain:list |
List all locally installed domains. |
| Domain Create | bg:domain:create |
Create a new Laravel domain. |
| Domain Remove | bg:domain:remove |
Remove a Laravel domain. |
| Domain Enable | bg:domain:enable |
Enable a Laravel domain. |
| Domain Disable | bg:domain:disable |
Disable a Laravel domain. |
List of bg:make commands
| Type | Command | Laravel Counterpart | Description |
|---|---|---|---|
| Cast | bg:make:cast |
make:cast |
Create a new custom Eloquent cast class in Laravel or in a specific package. |
| Channel | bg:make:channel |
make:channel |
Create a new channel class in Laravel or in a specific package. |
| Class | bg:make:class |
❌ | Create a new PHP class in Laravel or in a specific package. |
| Command | bg:make:command |
make:command |
Create a new Artisan command in Laravel or in a specific package. |
| Component | bg:make:component |
make:component |
Create a new view component class in Laravel or in a specific package. |
| Config | bg:make:config |
❌ | Create a new view component class in Laravel or in a specific package. |
| Controller | bg:make:controller |
make:controller |
Create a new controller class in Laravel or in a specific package. |
| Data | bg:make:data |
❌ | Create a new data class in Laravel or in a specific package. |
| Data Factory | bg:make:df |
❌ | Create a new data factory class in Laravel or in a specific package. |
| Data Transfer Object | bg:make:dto |
❌ | Create data tranfer object (DTO) files in Laravel or in a specific package. |
| Event | bg:make:event |
make:event |
Create a new event class in Laravel or in a specific package. |
| Exception | bg:make:exception |
make:exception |
Create a new custom exception class in Laravel or in a specific package. |
| Facade | bg:make:facade |
❌ | Create a new facade in Laravel or in a specific package. |
| Factory | bg:make:factory |
make:factory |
Create a new model factory in Laravel or in a specific package. |
| Helper | bg:make:helper |
❌ | Create a new helper file in Laravel or in a specific package. |
| Interface | bg:make:interface |
❌ | Create a new interface in Laravel or in a specific package. |
| Job | bg:make:job |
make:job |
Create a new job class in Laravel or in a specific package. |
| Listener | bg:make:listener |
make:listener |
Create a new event listener class in Laravel or in a specific package. |
bg:make:mail |
make:mail |
Create a new email class in Laravel or in a specific package. | |
| Middleware | bg:make:middleware |
make:middleware |
Create a new middleware class in Laravel or in a specific package. |
| Migration | bg:make:migration |
make:migration |
Create a new migration file in Laravel or in a specific package. |
| Model | bg:make:model |
make:model |
Create a new Eloquent model class in Laravel or in a specific package. |
| Notification | bg:make:notification |
make:notification |
Create a new notification class in Laravel or in a specific package. |
| Observer | bg:make:observer |
make:observer |
Create a new observer class in Laravel or in a specific package. |
| Policy | bg:make:policy |
make:policy |
Create a new policy class in Laravel or in a specific package. |
| Provider | bg:make:provider |
make:provider |
Create a new service provider class in Laravel or in a specific package. |
| Repository | bg:make:repository |
❌ | Create a new repository class in Laravel or in a specific package. |
| Request | bg:make:request |
make:request |
Create a new form request class in Laravel or in a specific package. |
| Resource | bg:make:resource |
make:resource |
Create a new resource file in Laravel or in a specific package. |
| Routes | bg:make:route |
❌ | Create new route file in Laravel or in a specific package. |
| Rule | bg:make:rule |
make:rule |
Create a new validation rule in Laravel or in a specific package. |
| Scope | bg:make:scope |
❌ | Create a new scope class in Laravel or in a specific package. |
| Seeder | bg:make:seeder |
make:seeder |
Create a new seeder class in Laravel or in a specific package. |
| Container | bg:make:service |
❌ | Create a new service container in Laravel or in a specific package. |
| Test | bg:make:test |
make:test |
Create a new test class in Laravel or in a specific package. |
| Trait | bg:make:trait |
❌ | Create a new interface in Laravel or in a specific package. |
Other bg commands
| Name | Command | Description |
|---|---|---|
| Describe | bg:describe |
Display all information about Laravel app and/or package/s. |
| Env Variables | bg:env:publish |
Publish all environment variables from root, packages, and domains. |
| Install | bg:install |
Setup your Laravel application to utilize the package. |
| Clear Logs | bg:log:clear |
Clear laravel.log contents. |
| Test | bg:test |
Run the application and package tests. |
Change log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email jamescarloluchavez@gmail.com instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.
luchavez/boilerplate-generator 适用场景与选型建议
luchavez/boilerplate-generator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.74k 次下载、GitHub Stars 达 10, 最近一次更新时间为 2023 年 03 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「BoilerplateGenerator」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 luchavez/boilerplate-generator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 luchavez/boilerplate-generator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 luchavez/boilerplate-generator 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Boilerplate Generator for Laravel and Laravel Packages
Alfabank REST API integration
Laravel package for Accurate Online API integration.
Shared RCX Laravel DataTables UI and configuration helpers.
Boot a Laravel project on any machine with one command: app:serve installs missing tools (PHP, Node, Composer, Herd, Docker), creates .env, sets up the database, runs migrations, builds assets, starts a queue worker and serves via Herd, Sail or artisan serve; app:down cleanly stops everything it sta
Branded, diagnostic error pages (500, 403, 404, 419, 503) for Filament — native Filament UI, dark mode and translations out of the box.
统计信息
- 总下载量: 1.74k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 16
- 依赖项目数: 2
- 推荐数: 7
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-21

