Invoice_detail   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
dl 0
loc 32
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A createdBy() 0 3 1
A Invoice() 0 3 1
A Plan() 0 3 1
A updatedBy() 0 3 1
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Invoice_detail extends Model
8
{
9
	 protected $table = 'trn_invoice_details';
10
11
	 protected $fillable = [
12
            'item_name',
13
	 		'plan_id',
14
	 		'item_description',
15
	 		'invoice_id',
16
	 		'item_amount',
17
	 		'created_by',
18
    		'updated_by',
19
	 ];  
20
21
	 public function createdBy()
22
    {
23
        return $this->belongsTo('App\User','created_by');
24
    }
25
26
    public function updatedBy()
27
    {
28
        return $this->belongsTo('App\User','updated_by');
29
    }  
30
    
31
    public function Invoice()
32
    {
33
    	return $this->belongsTo('App\Invoice','invoice_id');
34
    }
35
36
    public function Plan()
37
    {
38
        return $this->belongsTo('App\Plan','plan_id');
39
    }
40
}
41