Download the PHP package fomvasss/laravel-translatable without Composer
On this page you can find all versions of the php package fomvasss/laravel-translatable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fomvasss/laravel-translatable
More information about fomvasss/laravel-translatable
Files in fomvasss/laravel-translatable
Package laravel-translatable
Short Description A package to manage SEO (meta-tags, xml-fields, etc.)
License MIT
Informations about the package laravel-translatable
Make translations for Eloquent models
This is a Laravel package for creating translations content of Eloquent-models. For translation, created models in different languages, between which relations is established through additional fields. The main advantage is that there is no need to create additional tables, models or specific JSON-fields, all operations occur without changes. The functionality is very easy to integrate into an existing / running project. All you need to do is add two fields to the desired table / model by connecting one PHP-Trait.
Installation
To install the package, in terminal:
Publish
Run in terminal:
A configuration file will be published to config/translatable.php
.
Usage
- Add columns (
langcode
&translation_uuid
in translatable DB-table:
Example:
- Your model should use
Fomvasss\LaravelTranslatable\Traits\HasTranslations
trait to enable translations:
Example: app/Models/Article.php
- Get and Save article translations in your controller:
Example controller: app/Http/Controllers/ArticleController.php
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Fomin Vasyl
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Happy coding!
All versions of laravel-translatable with dependencies
illuminate/database Version ^6.0|^7.0|^8.0
illuminate/support Version ^6.0|^7.0.5|^8.0