Total Complexity | 3 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class Invitation extends Model |
||
8 | { |
||
9 | /** |
||
10 | * Get the student of this invitation. |
||
11 | * |
||
12 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
13 | */ |
||
14 | public function student() |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * Get the group of this invitation. |
||
21 | * |
||
22 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
23 | */ |
||
24 | public function group() |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Scope a query to get the student amount of invitations in a given course. |
||
31 | * |
||
32 | * @param \Illuminate\Database\Eloquent\Builder $query |
||
33 | * @param string $studentNumber |
||
34 | * @param int $courseId |
||
35 | * |
||
36 | * @return \Illuminate\Database\Eloquent\Builder |
||
37 | */ |
||
38 | public function scopeOfStudentInCourse($query, $studentNumber, $courseId) |
||
46 |