Actions
安装
备注
请参阅兼容性表。
要安装软件包,请运行以下控制台命令。
composer require --dev laravel-lang/actions:^1.13.2
用法
现在可以使用控制台命令 lang:update 更新已有的译文。
php artisan lang:update
也建议将该命令添加到 composer.json 文件 scripts 下的 post-update-cmd 中。
{
"scripts": {
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force",
"@php artisan lang:update"
]
}
}
这样,每次更新依赖后,翻译文件都会自动更新,无需手动运行 php artisan lang:update。
兼容性
| Laravel | PHP | Publisher | 软件包 | 状态 |
|---|---|---|---|---|
| 10, 11, 12, 13 | 8.1, 8.2, 8.3, 8.4, 8.5 | 15, 16 | ^1.0 | 支持 |