Completed
Push — master ( aa41f3...565443 )
by
unknown
10s
created

MasterSktm::getLabelAttribute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Bantenprov\Sktm\Models\Bantenprov\Sktm;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\SoftDeletes;
7
8
class MasterSktm extends Model
9
{
10
    use SoftDeletes;
11
12
    public $timestamps = true;
13
14
    protected $table = 'master_sktms';
15
    protected $fillable = [
16
        'nama',
17
        'instansi',
18
        'nilai',
19
        'user_id',
20
    ];
21
    protected $hidden = [
22
    ];
23
    protected $appends = [
24
        'label',
25
    ];
26
    protected $dates = [
27
        'deleted_at',
28
    ];
29
30
    public function getLabelAttribute()
31
    {
32
        return $this->nama;
33
    }
34
35
    public function user()
36
    {
37
        return $this->belongsTo('App\User', 'user_id');
38
    }
39
 }
40