wilbur-yu / hyperf-translatable
This package is abandoned and no longer maintained.
The author suggests using the wenber-yu/hyperf-translatable package instead.
A trait to make an model hold translations
3.2.0
2026-08-16 16:54 UTC
Requires
- php: >=8.1
- hyperf/collection: ^3.1
- hyperf/config: ^3.1
- hyperf/context: ^3.1
- hyperf/contract: ^3.1
- hyperf/database: ^3.1
- hyperf/event: ^3.1
- hyperf/stringable: ^3.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- mockery/mockery: ^1.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^10.5 || ^11.0
- swoole/ide-helper: ^5.0
- swow/swow: dev-develop
README
项目自用.
本组件移植于 spatie/laravel-translatable 使用方式相同. 只是适配了hyperf model 具体使用可以查看README.md
该包适用于简单的模型多语言. 若是内容繁多且复杂的系统可以使用 hyperf-ext/translatable
环境要求
- PHP >= 8.1
- Hyperf >= 3.1 (同时兼容 3.1 / 3.2)
安装
composer require wenber-yu/hyperf-translatable
发布配置文件
php ./bin/hyperf vendor:publish wenber-yu/hyperf-translatable