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

ChequeDetail::createdBy()   A

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 Sofa\Eloquence\Eloquence;
6
use Illuminate\Database\Eloquent\Model;
7
8
class ChequeDetail extends Model
9
{
10
    //Eloquence Search mapping
11
    use Eloquence;
12
    use updatedByUser;
13
14
    protected $table = 'trn_cheque_details';
15
16
    protected $fillable = [
17
            'payment_id',
18
            'number',
19
            'date',
20
            'status',
21
            'created_by',
22
            'updated_by',
23
     ];
24
25
    protected $searchableColumns = [
26
        'number' => 20,
27
    ];
28
29
    public function createdBy()
30
    {
31
        return $this->belongsTo('App\User', 'created_by');
32
    }
33
34
    public function payment()
35
    {
36
        return $this->belongsTo('App\PaymentDetail', 'payment_id');
37
    }
38
}
39