1 | <?php |
||
39 | class Company extends Model implements AuthenticatableContract, |
||
40 | AuthorizableContract, |
||
41 | CanResetPasswordContract, |
||
42 | PolicyCheckable |
||
43 | { |
||
44 | use Authenticatable, Authorizable, CanResetPassword; |
||
45 | |||
46 | /** |
||
47 | * The attributes that are mass assignable. |
||
48 | * |
||
49 | * @var array |
||
50 | */ |
||
51 | protected $fillable = ['name', 'email', 'password']; |
||
52 | |||
53 | /** |
||
54 | * The attributes excluded from the model's JSON form. |
||
55 | * |
||
56 | * @var array |
||
57 | */ |
||
58 | protected $hidden = ['password', 'remember_token']; |
||
59 | |||
60 | /** |
||
61 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
62 | */ |
||
63 | 82 | public function employees() |
|
67 | |||
68 | 38 | public function groups() |
|
72 | |||
73 | /** |
||
74 | * @param Group $group |
||
75 | * @return bool |
||
76 | */ |
||
77 | 16 | public function verifyGroup(Group $group) |
|
81 | |||
82 | /** |
||
83 | * @param Employee $employee |
||
84 | * @return bool |
||
85 | */ |
||
86 | 16 | public function verifyEmployee(Employee $employee) |
|
90 | |||
91 | /** |
||
92 | * @param Company $company |
||
93 | * @return bool |
||
94 | */ |
||
95 | public function verifyCompany(Company $company) |
||
99 | |||
100 | /** |
||
101 | * @param Calendar $calendar |
||
102 | * @return bool |
||
103 | */ |
||
104 | public function verifyCalendar(Calendar $calendar) |
||
109 | |||
110 | /** |
||
111 | * @param Meeting $meeting |
||
112 | * @return bool |
||
113 | */ |
||
114 | public function verifyMeeting(Meeting $meeting) |
||
119 | |||
120 | /** |
||
121 | * @param \DateTime $from |
||
122 | * @param \DateTime $to |
||
123 | * @return \Illuminate\Support\Collection |
||
124 | */ |
||
125 | 2 | public function getEmployeesTimeSlots($from, $to) |
|
137 | |||
138 | /** |
||
139 | * @param \DateTime $from |
||
140 | * @param \DateTime $to |
||
141 | * @return \Illuminate\Support\Collection |
||
142 | */ |
||
143 | 2 | public function getMeetingsTimeSlots($from, $to) |
|
155 | |||
156 | /** |
||
157 | * @param array $users |
||
158 | * @param array $meetings |
||
159 | * @return \Illuminate\Support\Collection |
||
160 | */ |
||
161 | 2 | public function getUsersMeetings(array $users, array $meetings) |
|
174 | } |
||
175 |