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

InvoiceDetail   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 13
dl 0
loc 24
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A invoice() 0 3 1
A plan() 0 3 1
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