Completed
Push — master ( 8d4ae0...cbdb30 )
by Emmanuel
01:14
created

TicketMessage::getTable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
4
namespace RexlManu\LaravelTickets\Models;
5
6
7
use Illuminate\Database\Eloquent\Model;
8
use RexlManu\LaravelTickets\Traits\HasConfigModel;
9
10
class TicketMessage extends Model
11
{
12
13
    use HasConfigModel;
14
15
    protected $fillable = [
16
        'message'
17
    ];
18
19
    public function getTable()
20
    {
21
        return config('laravel-tickets.database.ticket-messages-table');
22
    }
23
24
25
    public function ticket()
26
    {
27
        return $this->belongsTo(Ticket::class, 'ticket_id');
28
    }
29
30
    public function user()
31
    {
32
        return $this->belongsTo(config('laravel-tickets.user'));
33
    }
34
35
    public function uploads()
36
    {
37
        return $this->hasMany(TicketUpload::class);
38
    }
39
40
}
41