1 | <?php |
||
10 | class Ticket extends Model |
||
11 | { |
||
12 | use HasConfigModel; |
||
13 | |||
14 | protected $fillable = [ |
||
15 | 'subject', |
||
16 | 'priority', |
||
17 | 'state', |
||
18 | 'category_id', |
||
19 | ]; |
||
20 | |||
21 | public function getTable() |
||
25 | |||
26 | /** |
||
27 | * returns every user that had sent a message in the ticket |
||
28 | * |
||
29 | * @param false $ticketCreatorIncluded if the ticket user should be included |
||
30 | * |
||
31 | * @return \Illuminate\Support\Collection |
||
32 | */ |
||
33 | public function getRelatedUsers($ticketCreatorIncluded = false) |
||
42 | |||
43 | public function messages() |
||
47 | |||
48 | public function opener() |
||
52 | |||
53 | public function user() |
||
57 | |||
58 | public function category() |
||
62 | |||
63 | public function reference() |
||
67 | |||
68 | public function activities() |
||
72 | |||
73 | public function scopeState($query, $state) |
||
77 | |||
78 | public function scopePriority($query, $priority) |
||
82 | } |
||
83 |