1 | <?php |
||
20 | class TermData extends Model |
||
21 | { |
||
22 | /** |
||
23 | * @var bool Indicates if the model should be timestamped. |
||
24 | */ |
||
25 | public $timestamps = false; |
||
26 | |||
27 | /** |
||
28 | * @var string The table associated with the model. |
||
29 | */ |
||
30 | protected $table = 'taxonomy_terms_data'; |
||
31 | |||
32 | /** |
||
33 | * When used in a term, we set this to true or false |
||
34 | */ |
||
35 | public $translated = true; |
||
36 | |||
37 | /** |
||
38 | * @var array The attributes that are mass assignable. |
||
39 | */ |
||
40 | protected $fillable = ['term_id', 'language_id', 'title', 'description']; |
||
41 | |||
42 | /** |
||
43 | * Create a new Eloquent model instance. |
||
44 | * |
||
45 | * @param array $attributes |
||
46 | * @return void |
||
|
|||
47 | */ |
||
48 | public function __construct(array $attributes = []) |
||
56 | |||
57 | /** |
||
58 | * Get the term this data is linked to. |
||
59 | 174 | * |
|
60 | * @codeCoverageIgnore |
||
61 | 174 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
62 | 3 | */ |
|
63 | 3 | public function term() |
|
67 | 174 | ||
68 | 174 | /** |
|
69 | * Save the model to the database. |
||
70 | * |
||
71 | * @param array $options |
||
72 | * @return bool |
||
73 | */ |
||
74 | public function save(array $options = []) |
||
84 | |||
85 | public function toArray() |
||
91 | } |
||
92 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.