webfactorybulgaria / translatablebootforms
为翻译字段提供表单模型绑定,使用BootForms和Translatable。
v4.0.1
2016-01-05 09:21 UTC
Requires
- php: >=5.4.0
- adamwathan/bootforms: ~0.7.0
- dimsav/laravel-translatable: ~5.4.0
README
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