Passed
Push — master ( be1785...591f13 )
by Ajit
07:10
created

InvoiceDetail::invoice()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class InvoiceDetail extends Model
8
{
9
    use createdByUser, updatedByUser;
10
11
    protected $table = 'trn_invoice_details';
12
13
    protected $fillable = [
14
        'item_name',
15
        'plan_id',
16
        'item_description',
17
        'invoice_id',
18
        'item_amount',
19
        'created_by',
20
        'updated_by',
21
    ];
22
23
    public function invoice()
24
    {
25
        return $this->belongsTo('App\Invoice', 'invoice_id');
26
    }
27
28
    public function plan()
29
    {
30
        return $this->belongsTo('App\Plan', 'plan_id');
31
    }
32
}
33