Download the PHP package fienta/laravel-translatable-bootforms without Composer
On this page you can find all versions of the php package fienta/laravel-translatable-bootforms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-translatable-bootforms
Laravel Translatable BootForms
Make BootForms work flawlessly with Laravel Translatable!
By importing this package, generating translatable forms using BootForms is a breeze.
Installation
-
Run the Composer require command to install the package
-
In your app config, add the Service Provider in the
$providers
array afterBootFormsServiceProvider
andTranslatableServiceProvider
-
In your app config, add the Facade to the
$aliases
array - Publish the configuration file
Usage
Simply use the TranslatableBootForm
Facade as if it were BootForm
! That's it. Multiple form inputs will now be generated for the locales set in Translatable's configuration file. They will have the corresponding value for each language and will save all of the translations without any code manipulation.
Please review BootForms' documentation if you're unsure how to use it.
Example:
You can use the %name
and %locale
placeholders while specifying parameters. The placeholder will be replaced with the corresponding input name or locale.
This can be useful for two-way data binding libraries such as Angular.js or Vue.js. E.g.
To render a form element only for some chosen locales, explicitly call renderLocale()
as the final method and pass the locale or an array of locales as the first parameter:
If you need to apply a method only for certain locales, suffix the method with ForLocale
and pass the locale or an array of locales as the first parameter:
In case you need to construct name attributes other than en[name]
, e.g. item.en.name
, manually insert the %locale
placeholder in your name attribute. Note that model binding will break for these inputs.
For customizing the locale indicator in the label (and several other settings), please take a look at the configuration file.
All versions of laravel-translatable-bootforms with dependencies
illuminate/support Version >=5.5|>=11.0
fienta/bootforms Version ^1.2.0|^1.7.2
astrotomic/laravel-translatable Version >=8.0