TicketUpload::getTable()   A
last analyzed

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
/**
11
 * Class TicketUpload
12
 *
13
 * When a user sent a message with a file, the file gets attached to the ticket message
14
 *
15
 * @package RexlManu\LaravelTickets\Models
16
 */
17
class TicketUpload extends Model
18
{
19
20
    use HasConfigModel;
21
22
    protected $fillable = [
23
        'path'
24
    ];
25
26
    public function getTable()
27
    {
28
        return config('laravel-tickets.database.ticket-uploads-table');
29
    }
30
31
    /**
32
     * The message where the upload is attached to it
33
     *
34
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
35
     */
36
    public function message()
37
    {
38
        return $this->belongsTo(TicketMessage::class, 'ticket_message_id');
39
    }
40
41
}
42