Sms_trigger   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 30
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createdBy() 0 3 1
A updatedBy() 0 3 1
1
<?php
2
3
namespace App;
4
5
use Sofa\Eloquence\Eloquence;
6
use Illuminate\Database\Eloquent\Model;
7
8
class Sms_trigger extends Model
9
{
10
    protected $table = 'mst_sms_triggers';
11
12
    protected $fillable = [
13
            'name',
14
    		'alias',
15
            'message',
16
    		'status',
17
    		'updated_by'
18
    ];
19
20
    const CREATED_AT = null;
21
22
    //Eloquence Search mapping
23
    use Eloquence;
24
25
    protected $searchableColumns = [
26
        'name' => 20,
27
        'message' => 10,
28
    ];
29
30
    public function createdBy()
31
    {
32
        return $this->belongsTo('App\User','created_by');
33
    }
34
35
    public function updatedBy()
36
    {
37
        return $this->belongsTo('App\User','updated_by');
38
    }
39
}
40