This repository was archived by the owner on Jun 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 323
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 {
public $timestamps = false;
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'];
}