nevadskiy/laravel-translatable
最新稳定版本:0.10.0
Composer 安装命令:
composer require nevadskiy/laravel-translatable
包简介
Add translations to your Eloquent models
README 文档
README
🍬 Features
- Translatable attributes behave like regular model attributes.
- Full support for accessors, mutators and casts (even JSON).
- Fallback translations.
- 4 different strategies for storing translations.
📺 Quick demo
$book = new Book() $book->translator()->set('title', 'Fifty miles', 'en') $book->translator()->set('title', "П'ятдесят верстов", 'uk') $book->save(); app()->setLocale('en'); echo $book->title; // Fifty miles app()->setLocale('uk'); echo $book->title; // П'ятдесят верстов
✅ Requirements
- PHP
7.2or newer - Laravel
7.0or newer - Can work with Octane
🔌 Installation
Install the package via composer:
composer require nevadskiy/laravel-translatable
📑 Documentation
Documentation for the package can be found in the Wiki section.
📄 Changelog
Please see CHANGELOG for more information what has changed recently.
☕ Contributing
Thank you for considering contributing. Please see CONTRIBUTING for more information.
📜 License
The MIT License (MIT). Please see LICENSE for more information.
统计信息
- 总下载量: 19.03k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 20
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2020-05-16