PHP Class Dimsav\Translatable\Test\Model\Food

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
$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

public $fillable

$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