1 | <?php |
||
26 | class Group extends Model |
||
27 | { |
||
28 | /** |
||
29 | * The database table used by the model. |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $table = 'groups'; |
||
34 | |||
35 | /** |
||
36 | * The attributes that are mass assignable. |
||
37 | * |
||
38 | * @var array |
||
39 | */ |
||
40 | protected $fillable = ['name', 'description', 'planner_id']; |
||
41 | |||
42 | /** |
||
43 | * @var array |
||
44 | */ |
||
45 | protected $hidden = ['planner']; |
||
46 | |||
47 | /** |
||
48 | * @var array |
||
49 | */ |
||
50 | protected $appends = ['planner_name']; |
||
51 | |||
52 | 14 | public function getPlannerNameAttribute() |
|
57 | |||
58 | /** |
||
59 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
||
60 | */ |
||
61 | 10 | public function employees() |
|
65 | |||
66 | /** |
||
67 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
68 | */ |
||
69 | 14 | public function planner() |
|
73 | |||
74 | /** |
||
75 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
76 | */ |
||
77 | public function company() |
||
81 | } |
||
82 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.