跳到主要内容
版本:Legacy

Attributes

稳定版 未知

在 GitHub 上查看

安装​

备注

请参阅兼容性表。

要安装软件包,请运行以下控制台命令。

composer require --dev laravel-lang/attributes:^2.16.5

用法​

现在可以使用控制台命令 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。

兼容性​

LaravelPHPPublisher软件包状态
10, 11, 12, 138.1, 8.2, 8.3, 8.4, 8.515, 16^2.5支持
8, 9, 10, 118.1, 8.214^2.0不支持
7, 8, 97.3, 7.4, 8.0, 8.112, 13^1.0不支持