typicms / translatablebootforms
用于翻译字段表单模型绑定,使用 BootForms 和 Translatable。
v2.3.0
2015-12-25 14:40 UTC
Requires
- php: >=5.4.0
- adamwathan/bootforms: ~0.7.0
- dimsav/laravel-translatable: ~5.4.0
README
此包将可能被 TypiCMS 下一个版本弃用,并可能使用 Laravel-Translatable-Bootforms
TranslatableBootForms 是基于 BootForms 和 Laravel Translatable 构建的 Laravel 包,它允许在翻译字段上进行表单模型绑定。
使用 Composer 安装
您可以使用以下命令通过 Composer 安装此包
composer require typicms/translatablebootforms
Laravel 中的安装
修改 config/app.php
中的 providers
数组以包含服务提供者
'providers' => [ //… TypiCMS\TranslatableBootForms\TranslatableBootFormsServiceProvider::class, ],
运行 composer update
将 BootForm
和 Translatable
门面添加到 config/app.php
中的 aliases
数组
'aliases' => [ //… 'BootForm' => AdamWathan\BootForms\Facades\BootForm::class, 'Translatable' => Dimsav\Translatable\Translatable::class, ],
您现在可以通过直接在 BootForm
门面上调用方法来开始使用 BootForms
BootForm::text('title', 'en[title]')
文档
BootForms
https://github.com/adamwathan/bootforms
Laravel-Translatable
https://github.com/dimsav/laravel-translatable