1 | <?php |
||
37 | class Employee extends Model implements AuthenticatableContract, |
||
38 | AuthorizableContract, |
||
39 | CanResetPasswordContract, |
||
40 | PolicyCheckable |
||
41 | { |
||
42 | use Authenticatable, Authorizable, CanResetPassword; |
||
43 | |||
44 | /** |
||
45 | * The database table used by the model. |
||
46 | * |
||
47 | * @var string |
||
48 | */ |
||
49 | //protected $table = 'employees'; |
||
50 | |||
51 | /** |
||
52 | * The attributes that are mass assignable. |
||
53 | * |
||
54 | * @var array |
||
55 | */ |
||
56 | protected $fillable = ['name', 'email', 'password']; |
||
57 | |||
58 | /** |
||
59 | * The attributes excluded from the model's JSON form. |
||
60 | * |
||
61 | * @var array |
||
62 | */ |
||
63 | protected $hidden = ['password', 'remember_token']; |
||
64 | |||
65 | /** |
||
66 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
67 | */ |
||
68 | 2 | public function company() |
|
72 | |||
73 | /** |
||
74 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
||
75 | */ |
||
76 | public function groups() |
||
80 | |||
81 | /** |
||
82 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
||
83 | */ |
||
84 | public function meetings() |
||
88 | |||
89 | /** |
||
90 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
91 | */ |
||
92 | public function calendars() |
||
96 | |||
97 | /** |
||
98 | * Get the e-mail address where password reset links are sent. |
||
99 | * This is needed for multiple user type login |
||
100 | * |
||
101 | * Make email unique |
||
102 | * |
||
103 | * @return string |
||
104 | */ |
||
105 | 2 | public function getEmailForPasswordReset() |
|
109 | |||
110 | /** |
||
111 | * @param Group $group |
||
112 | * @return bool |
||
113 | */ |
||
114 | public function verifyGroup(Group $group) |
||
118 | |||
119 | /** |
||
120 | * @param Employee $employee |
||
121 | * @return bool |
||
122 | */ |
||
123 | public function verifyEmployee(Employee $employee) |
||
127 | |||
128 | /** |
||
129 | * @param Company $company |
||
130 | * @return bool |
||
131 | */ |
||
132 | public function verifyCompany(Company $company) |
||
136 | } |
||
137 |