Invoice_detail::updatedBy()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
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