PHP Class Dimsav\Translatable\Test\Model\Country

Inheritance: extends Illuminate\Database\Eloquent\Model, use trait Dimsav\Translatable\Translatable
Show file Open project: dimsav/laravel-translatable Class Usage Examples

Public Properties

Property Type Description
$fillable array Add your translated attributes here if you want fill them with mass assignment.
$localeKey string Defaults to 'locale'.
$translatedAttributes array Array with the fields translated in the Translation table.
$translationForeignKey Set this if you want to overwrite the laravel default for foreign keys.
$translationModel The convention is to add "Translation" to the name of the class extending Translatable. Example: Country => CountryTranslation

Property Details

$fillable public property

Add your translated attributes here if you want fill them with mass assignment.
public array $fillable
return array

$localeKey public property

Defaults to 'locale'.
public string $localeKey
return string

$translatedAttributes public property

Array with the fields translated in the Translation table.
public array $translatedAttributes
return array

$translationForeignKey public property

Set this if you want to overwrite the laravel default for foreign keys.
public $translationForeignKey

$translationModel public property

The convention is to add "Translation" to the name of the class extending Translatable. Example: Country => CountryTranslation
public $translationModel