webfactorybulgaria/translatablebootforms

为翻译字段提供表单模型绑定,使用BootForms和Translatable。

v4.0.1 2016-01-05 09:21 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:36:46 UTC


README

TranslatableBootForms是一个基于BootFormsLaravel Translatable构建的Laravel包,它允许在翻译字段上进行表单模型绑定。

使用Composer安装

您可以使用以下命令通过Composer安装此包:

composer require typicms/translatablebootforms

Laravel中的安装

修改config/app.php中的providers数组以包含服务提供者

'providers' => [
    //…
    TypiCMS\TranslatableBootForms\TranslatableBootFormsServiceProvider::class,
],

运行composer update

BootFormTranslatable门面添加到`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