| 1 | <?php |
||
| 14 | class Translation extends Model |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * {@inheritdoc} |
||
| 18 | */ |
||
| 19 | protected $table = 'translations'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * {@inheritdoc} |
||
| 23 | */ |
||
| 24 | protected $primaryKey = null; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | */ |
||
| 29 | public $incrementing = false; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * {@inheritdoc} |
||
| 33 | */ |
||
| 34 | public $timestamps = false; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * {@inheritdoc} |
||
| 38 | */ |
||
| 39 | protected $fillable = [ |
||
| 40 | 'locale_id', |
||
| 41 | 'translation_id', |
||
| 42 | 'translatable_id', |
||
| 43 | 'translatable_type', |
||
| 44 | ]; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | protected $casts = [ |
||
| 50 | 'locale_id' => 'integer', |
||
| 51 | 'translation_id' => 'integer', |
||
| 52 | 'translatable_id' => 'integer', |
||
| 53 | ]; |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Translatable polymorphic relationship. |
||
| 57 | * |
||
| 58 | * @return \Illuminate\Database\Eloquent\Relations\MorphTo |
||
| 59 | */ |
||
| 60 | public function translatable(): MorphTo |
||
| 64 | } |
||
| 65 |