1 | <?php |
||
10 | class MailmanMessageModel extends Model |
||
11 | { |
||
12 | /** |
||
13 | * {@inheritdoc} |
||
14 | */ |
||
15 | protected $table; |
||
16 | |||
17 | /** |
||
18 | * {@inheritdoc} |
||
19 | */ |
||
20 | protected $fillable = [ |
||
21 | 'message_id', |
||
22 | 'content_type', |
||
23 | 'status', |
||
24 | 'from', |
||
25 | 'to', |
||
26 | 'reply_to', |
||
27 | 'cc', |
||
28 | 'bcc', |
||
29 | 'subject', |
||
30 | 'body', |
||
31 | 'instance', |
||
32 | ]; |
||
33 | |||
34 | /** |
||
35 | * The attributes that should be cast to native types. |
||
36 | * |
||
37 | * @var array |
||
38 | */ |
||
39 | protected $casts = [ |
||
40 | 'from' => 'json', |
||
41 | 'to' => 'json', |
||
42 | 'reply_to' => 'json', |
||
43 | 'cc' => 'json', |
||
44 | 'bcc' => 'json', |
||
45 | ]; |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function __construct(array $attributes = []) |
||
55 | |||
56 | /** |
||
57 | * Set instance attribute. |
||
58 | * |
||
59 | * @param $value |
||
60 | */ |
||
61 | public function setInstanceAttribute($value) |
||
65 | |||
66 | /** |
||
67 | * Get instance attribute. |
||
68 | * |
||
69 | * @param $value |
||
70 | * |
||
71 | * @return mixed |
||
72 | */ |
||
73 | public function getInstanceAttribute($value) |
||
77 | } |
||
78 |