Skip to content
This repository was archived by the owner on Jun 18, 2019. It is now read-only.

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.

From 5.* to 6.*

Fillable fields

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.

Before

class Country extends Eloquent {

    use \Dimsav\Translatable\Translatable;

    public $translatedAttributes = array('name');
    protected $fillable = ['code', 'name'];

}

class CountryTranslation extends Eloquent {

    protected $fillable = ['name'];

}

After

class Country extends Eloquent {

    use \Dimsav\Translatable\Translatable;

    public $translatedAttributes = array('name');
    protected $fillable = ['code'];

}

class CountryTranslation extends Eloquent {

    protected $fillable = ['name'];

}

Always fillable option

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.

Clone this wiki locally