1 | <?php |
||
7 | class Training extends Model |
||
8 | { |
||
9 | protected $table = 'trainings'; |
||
10 | public $timestamps = true; |
||
11 | |||
12 | protected $fillable = ['name', 'renews_in', 'description', 'administrative', 'training_type_id']; |
||
13 | protected $dates = ['created_at', 'updated_at']; |
||
14 | protected $appends = ['incompleted']; |
||
15 | |||
16 | 43 | public function assignedUsers() |
|
20 | |||
21 | 20 | public function users() |
|
25 | |||
26 | public function groups() |
||
30 | |||
31 | 4 | public function attachments() |
|
35 | |||
36 | 2 | public function getIncompletedAttribute() |
|
43 | |||
44 | /** |
||
45 | * @param $query |
||
46 | * @param $input |
||
47 | */ |
||
48 | 3 | public function scopeSearchTraining($query, $input) |
|
52 | |||
53 | /** |
||
54 | * Get the training type for the training. |
||
55 | */ |
||
56 | 2 | public function trainingType() |
|
60 | } |
||
61 |