ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
[TOC] 我们都知道 Laravel 扩展包的注册会对应用造成消耗。有一些扩展包是开发环境中专用,生产环境中并不会使用到,为了避免无用的负载, 必须严格控制其安装和加载。 # 安装 安装开发专用扩展包时必须使用--dev参数,如: ~~~ composer require laracasts/generators --dev ~~~ # 加载 开发专用的 provider绝不在config/app.php里面注册,必须在app/Providers/AppServiceProvider.php文件中使用如以下方式: ~~~ public function register() { if ($this->app->environment() == 'local') { $this->app->register('Laracasts\Generators\GeneratorsServiceProvider'); } } ~~~ # 其他一些包 - [PHP_CodeSniffer](https://laravel-china.org/articles/5646/php-series-code-sniffer-for-code-specification )是一个代码风格检测工具 - [soapbox/laravel-formatter ](https://github.com/SoapBox/laravel-formatter) 转换xml的包 - [spatie/fractalistic 简短的transform](https://github.com/spatie/fractalistic) - [根据ip显示地址](https://github.com/zhuzhichao/ip-location-zh ) - [addons/plugins 模块分层插件](https://github.com/fly-studio/laravel-addons-plugins) - [识别客户端信息](https://github.com/jenssegers/agent) - [二维码生成](https://packagist.org/packages/endroid/qrcode) - [缓存整个响应包](https://packagist.org/packages/spatie/laravel-responsecache) - 自动记录用户行为扩展 action-log composer ,require luoyangpeng/action-log - [基于 Web UI 的 Beanstalk 消息队列服务器管理工具](https://github.com/xuri/aurora) - [redis管理](https://github.com/z-song/redis-manager) - [laravel admin](https://github.com/z-song/laravel-admin) - [优雅的展示 PHPUnit 测试结果](https://github.com/mikeerickson/phpunit-pretty-result-printer ) - [ENV 后台可视化配置](https://github.com/jc91715/env) 还有一个包https://github.com/Brotzka/laravel-dotenv-editor - [JosephSilber/page-cache Laravel 静态页面缓存](https://laravel-china.org/topics/7939/extension-recommendation-josephsilberpage-cache-laravel-static-page-caching) 前100个扩展包 : https://laravel-china.org/topics/2530/the-highest-amount-of-downloads-of-the-100-laravel-extensions-recommended 大部分扩展包:https://packalyst.com/