This repository has been archived by the owner on Jun 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 320
Update guide
Dimitris Savvopoulos edited this page Mar 27, 2015
·
11 revisions
Laravel translatable follows semantic versioning.
In this guide you will find descriptions about how to update from a major version of the package to another.
In versions prior to 6, to define a translation as fillable you had to define the fillable fields in both Country and CountryTranslation. This is no longer a requirement.
class Country extends Eloquent {
use \Dimsav\Translatable\Translatable;
public $translatedAttributes = array('name');
protected $fillable = ['code', 'name'];
}
class CountryTranslation extends Eloquent {
protected $fillable = ['name'];
}
class Country extends Eloquent {
use \Dimsav\Translatable\Translatable;
public $translatedAttributes = array('name');
protected $fillable = ['code'];
}
class CountryTranslation extends Eloquent {
protected $fillable = ['name'];
}
The always_fillable setting has been removed for good practice and security reasons. Now that fillable fields in translation models are setup like in any other Laravel model.
Remove this line from the config file translatable.php
:
'always_fillable' => false,`