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