bunta/translations is a Laravel package for translation trait.
It currently has 0 GitHub stars and 9 downloads on Packagist.
Install it with composer require bunta/translations.
Discover more Laravel packages by bunta
or browse all Laravel packages to compare alternatives.
Last updated
'providers' => [
...
Bunta\Translations\TranslationsServiceProvider::class
...
],
...
use \Bunta\Translations\TranslationsTrait;
...
public $translatedAttributes = ['nameVirtualAttributeToTranslate'];
...
composer du
php artisan optimize
php artisan vendor:publish
php artisan migrate
$model->nameVirtualAttributeToTranslate;
@foreach(Config::get('translations.locales') as $lang)
{!! Form::text("nameVirtualAttributeToTranslate[$lang]",$model->translation('nameVirtualAttributeToTranslate',$lang)) !!}
@endforeach
Model::create($request->all());