nauvalazhar / facade-please
Laravel 5 Facade 生成器
0.2.0
2017-09-01 20:49 UTC
Requires
- php: >=5.6.0
This package is not auto-updated.
Last update: 2024-09-26 07:32:37 UTC
README
有时候您想创建一个全局可访问的方法的 Facade,但您不喜欢这样做,因为您需要执行几个步骤。 Facade, please! 是一个 Laravel 包,可以解决您的问题,只需一个命令,您的 Facade 就可以立即使用!
要求
- PHP >= 5.6.*
- Laravel 5
安装
composer require nauvalazhar/facade-please
添加到 config/app.php
'providers' => [
...
Nauvalazhar\FacadePlease\FacadePleaseServiceProvider::class,
使用
使用列表
php artisan facade usage
创建
php artisan facade:please YourFacade
生成的 Facade 将默认存储在 app/MyFacades
文件夹中,但您可以在 config/facadeplease.php
文件中更改目标文件夹。在这样做之前,您需要执行 此步骤。
删除
php artisan facade:delete YourFacade
列出所有 Facade
php artisan facade:list
获取 Facade 信息
php artisan facade:diag YourFacade [--methods] [--public] [--private]
配置
php artisan vendor:publish --tag=facadeplease
变更日志
0.2.0 - Hope you love this
-----
New
---
- Optional argument for command: php artisan facade
- Automatically adds a comma at the end of the provider array element and aliases array in `config/app.php`
- Added a new command to list all facades
- Added a new command to diagnose the facade
- Added new command for usage
Changes
-------
- Add 'require' in composer.json
- Some changes to the 'php artisan facade' command
- Some changes to the 'php artisan facade:delete' command
0.1.1 - Initial release
-----
Fix
---
- fix Composer.json
0.1.0 - First release (Don't use this)
- First commit
致谢
感谢 @rizalio 提供的帮助!
许可证
MIT 许可证