-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssign.php
More file actions
85 lines (62 loc) · 1.76 KB
/
Assign.php
File metadata and controls
85 lines (62 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
namespace App\Models\Setting;
use Illuminate\Database\Eloquent\Model;
class Assign extends Model
{
protected $table = 'setting_assign';
protected $fillable = ['team_id', 'web', 'web_rule', 'wechat', 'weibo', 'voip', 'repeat', 'mail'];
public function setWebAttribute($value)
{
$this->attributes['web'] = json_encode($value);
}
public function getWebAttribute($value)
{
$array = json_decode($value, true);
return $array ? $array : [];
}
public function setWechatAttribute($value)
{
$this->attributes['wechat'] = json_encode($value);
}
public function getWechatAttribute($value)
{
$array = json_decode($value, true);
return $array ? $array : [];
}
public function setWeiboAttribute($value)
{
$this->attributes['weibo'] = json_encode($value);
}
public function getWeiboAttribute($value)
{
$array = json_decode($value, true);
return $array ? $array : [];
}
public function setVoipAttribute($value)
{
$this->attributes['voip'] = json_encode($value);
}
public function getVoipAttribute($value)
{
$array = json_decode($value, true);
return $array ? $array : [];
}
public function setWebRuleAttribute($value)
{
$this->attributes['web_rule'] = json_encode($value);
}
public function getWebRuleAttribute($value)
{
$array = json_decode($value, true);
return $array ? $array : [];
}
public function setMailAttribute($value)
{
$this->attributes['mail'] = json_encode($value);
}
public function getMailAttribute($value)
{
$array = json_decode($value, true);
return $array ? $array : [];
}
}