# 安装依赖 ## laravel调试工具 安装: ~~~bash > composer require barryvdh/laravel-debugbar --dev ~~~ > `APP_DEBUG` 设置为 `true` 启用 Debugbar ## ide函数帮助 安装: ~~~bash > composer require --dev barryvdh/laravel-ide-helper ~~~ ~~~bash > php artisan ide-helper:generate ~~~ 为 Facades 生成注释 ~~~bash > php artisan ide-helper:models ~~~ 为数据模型生成注释 ~~~bash > php artisan ide-helper:meta ~~~ 生成 PhpStorm Meta file ## laravel语言包 安装: ~~~bash > composer require "overtrue/laravel-lang:~6.0" ~~~ ## 防XSS攻击 安装: ~~~bash > composer require mews/purifier ~~~ 在 `config/app.php` 文件的 `providers` 数组添加以下 `Mews\Purifier\PurifierServiceProvider::class,` 发布配置 ~~~bash > php artisan vendor:publish --provider="Mews\Purifier\PurifierServiceProvider" ~~~ 修改配置 `config/purifier.php` 增加自定义配置 `jiuge_config` ~~~php return [ ... 'settings' => [ ... 'jiuge_config' => [ 'HTML.Doctype' => 'XHTML 1.0 Strict', 'HTML.Allowed' => 'div,b,strong,i,em,a[href|title],ul,ol,li,p[style],br,span[style],img[width|height|alt|src],pre,code', 'CSS.AllowedProperties' => 'font,font-size,font-weight,font-style,font-family,text-decoration,padding-left,color,background-color,text-align', 'AutoFormat.AutoParagraph' => true, 'AutoFormat.RemoveEmpty' => true, ], ], ]; ~~~