mrpunyapal/laravel-extended-commands
Composer 安装命令:
composer require --dev mrpunyapal/laravel-extended-commands
包简介
This package will have some commands which are not available in laravel.
README 文档
README
Installation
You can install the package via composer:
composer require mrpunyapal/laravel-extended-commands
You can publish the config file with:
php artisan vendor:publish --tag="laravel-extended-commands-config"
This is the contents of the published config file:
return [ // Nothing to configure yet. ];
Laravel Boost
This package ships a Laravel Boost skill for its generators.
In a Laravel application that has laravel/boost installed, add this package and then run one of the following commands to discover or refresh the packaged skill:
php artisan boost:install php artisan boost:update --discover
Boost can then install the laravel-extended-commands-development skill for tasks involving this package's custom Artisan generators.
Usage
Make Builder
php artisan make:builder {name}
Make Builder with Model
php artisan make:builder {name} --model={model}
Make Collection
Create a new Eloquent custom collection class. By default the class is generated into the App\Models\Collections namespace and extends Illuminate\Database\Eloquent\Collection.
php artisan make:collection {name}
Create a collection with a model generic PHPDoc (adds @template and @extends in the generated class):
php artisan make:collection {name} --model={model}
When generating a model you can also scaffold a collection for it and inject a newCollection() method into the model using the --collection flag:
php artisan make:model {name} --collection
This will generate App\Models\Collections\{Name}Collection and add a newCollection(array $models = []) method to the model which returns the new collection instance.
Make Model with Builder
php artisan make:model {name} --builder
Make Action
Create a new action class. By default the class is generated into the App\Actions namespace and contains a handle() method.
php artisan make:action {name}
Create an invokable action (generates an __invoke method):
php artisan make:action {name} --invokable
Force overwrite an existing action file:
php artisan make:action {name} --force
Make Concern
Create a new concern (trait). By default the trait is generated into the App\\Concerns namespace.
php artisan make:concern {name}
Force overwrite an existing concern file:
php artisan make:concern {name} --force
Make Contract
Create a new contract (interface). By default the interface is generated into the App\\Contracts namespace.
php artisan make:contract {name}
Force overwrite an existing contract file:
php artisan make:contract {name} --force
Make Facade
Create a new facade class. By default the class is generated into the App\Facades namespace and extends Illuminate\Support\Facades\Facade.
php artisan make:facade {name}
The command will automatically generate a snake_case accessor based on the facade name. For example:
php artisan make:facade FileUpload
This generates App\Facades\FileUpload with accessor file_upload.
Force overwrite an existing facade file:
php artisan make:facade {name} --force
If the name argument is not provided, you will be prompted to enter it:
php artisan make:facade
# Enter FacadeName (ex. FileUpload): Payment
You can also create facades with namespaces:
php artisan make:facade Payment\Stripe
This generates App\Facades\Payment\Stripe with accessor stripe.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
mrpunyapal/laravel-extended-commands 适用场景与选型建议
mrpunyapal/laravel-extended-commands 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 913 次下载、GitHub Stars 达 78, 最近一次更新时间为 2025 年 03 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「dev」 「Make commands」 「Punyapal Shah」 「laravel-extended-commands」 「make Builder」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mrpunyapal/laravel-extended-commands 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mrpunyapal/laravel-extended-commands 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mrpunyapal/laravel-extended-commands 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Monolog bridge for PHP Debugbar
Simple and fast methods to read private properties and call private methods
Laravel Artisan Command To Generate Facades (php artisan make generator now execpts facade Facadename)
Analysis module for finding problematical shop data.
Analysis module for finding problematical shop data.
Enforce architecture by defining modules with allowed dependencies. Detects forbidden, uncovered, missing and unused module dependencies in PHP projects.
统计信息
- 总下载量: 913
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 78
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-24