1 | <?php |
||
34 | class Group extends Model |
||
35 | { |
||
36 | /** |
||
37 | * The attributes that are mass assignable. |
||
38 | * |
||
39 | * @var array |
||
40 | */ |
||
41 | protected $fillable = ['name', 'description', 'planner_id']; |
||
42 | |||
43 | /** |
||
44 | * @var array |
||
45 | */ |
||
46 | protected $hidden = ['planner', 'pivot']; |
||
47 | |||
48 | /** |
||
49 | * @var array |
||
50 | */ |
||
51 | protected $appends = ['planner_name']; |
||
52 | |||
53 | 28 | public function getPlannerNameAttribute() |
|
59 | |||
60 | /** |
||
61 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
||
62 | */ |
||
63 | 14 | public function employees() |
|
67 | |||
68 | /** |
||
69 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
70 | */ |
||
71 | 34 | public function planner() |
|
75 | |||
76 | /** |
||
77 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
78 | */ |
||
79 | public function company() |
||
83 | |||
84 | public function meetings() |
||
88 | } |
||
89 |