| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | class Student extends Model |
||
| 13 | { |
||
| 14 | |||
| 15 | use SoftDeletes; |
||
| 16 | use EloquentGetTableName; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * The attributes that should be mutated to dates. |
||
| 20 | * |
||
| 21 | * @var array |
||
| 22 | */ |
||
| 23 | protected $dates = ["deleted_at"]; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Get the compilations of this student |
||
| 27 | * @return HasMany |
||
| 28 | */ |
||
| 29 | public function compilations() : HasMany |
||
| 30 | { |
||
| 31 | return $this->hasMany("App\Models\Compilation"); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Get the user of this student |
||
| 36 | * @return BelongsTo |
||
| 37 | */ |
||
| 38 | public function user() : BelongsTo |
||
| 41 | } |
||
| 42 | |||
| 44 |