wilbur-yu / hyperf-translatable
A trait to make an model hold translations
Installs: 1 261
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=8.0
- hyperf/config: ^3.0
- hyperf/contract: ^3.0
- hyperf/database: ^3.0
- hyperf/di: ^3.0
- hyperf/event: ^3.0
- hyperf/utils: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- mockery/mockery: ^1.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: >=7.0
- swoole/ide-helper: ^5.0
- swow/swow: dev-develop
README
项目自用.
本组件移植于 spatie/laravel-translatable 使用方式相同. 只是适配了hyperf model 具体使用可以查看README.md
该包适用于简单的模型多语言. 若是内容繁多且复杂的系统可以使用 hyperf-ext/translatable
安装
composer require wilbur-yu/hyperf-translatable
发布配置文件
php ./bin/hyperf vendor:publish wilbur-yu/hyperf-translatable