Download the PHP package mikehins/laravel-translatable without Composer
On this page you can find all versions of the php package mikehins/laravel-translatable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mikehins/laravel-translatable
More information about mikehins/laravel-translatable
Files in mikehins/laravel-translatable
Package laravel-translatable
Short Description A translatable behaviour for eloquent models
License MIT
Informations about the package laravel-translatable
laravel-translatable
DO NOT USE YET... MORE INSTRUCTIONS TO COME...
Laravel translatable uses the model events to create update or delete translations associated with a model.
Installation
Next, you need to publish the migration
and the config file
You will need to run the migration to create the translations table
You need to edit the configuration file to tell your app which languages you will use
Usage
To use the package you need to add a trait to your model
In your forms you need to use an array input called translatable then use the language code as key and then the field name you want to use
You can specify the value of the field in combination with the helper
You can also show errors if the validation fail
Here's a code snippet using bootstrap 4 with tabs
Validation
To validate the input you can use the validator like usual
Or inside a form request validator
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Credits
- Mike Hins
- All contributors
License
The MIT License (MIT). Please see License File for more information.