1 | <?php |
||
27 | class Group extends Model |
||
28 | { |
||
29 | /** |
||
30 | * The attributes that are mass assignable. |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | protected $fillable = ['name', 'description', 'planner_id']; |
||
35 | |||
36 | /** |
||
37 | * @var array |
||
38 | */ |
||
39 | protected $hidden = ['planner', 'pivot']; |
||
40 | |||
41 | /** |
||
42 | * @var array |
||
43 | */ |
||
44 | protected $appends = ['planner_name']; |
||
45 | |||
46 | 54 | public function getPlannerNameAttribute() |
|
52 | |||
53 | /** |
||
54 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
||
55 | */ |
||
56 | 48 | public function employees() |
|
60 | |||
61 | /** |
||
62 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
63 | */ |
||
64 | 141 | public function planner() |
|
68 | |||
69 | /** |
||
70 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
71 | */ |
||
72 | public function company() |
||
76 | |||
77 | 117 | public function meetings() |
|
81 | } |
||
82 |