TarifModel::getItem()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Bantenprov\PemakaianBahuJalan\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\SoftDeletes;
7
8
class TarifModel extends Model 
9
{
10
11
    protected $table = 'pbj_tarifs';
12
    public $timestamps = true;
13
14
    use SoftDeletes;
15
16
    protected $dates = ['deleted_at'];
17
    protected $fillable = array('uuid', 'uraian', 'tarif', 'wilayah_kota', 'wilayah_kabupaten', 'satuan', 'master_tarif_id');
18
19
    public function getMasterTarif()
20
    {
21
        return $this->hasOne('MasterTarif', 'master_tarif_id');
22
    }
23
24
    public function getItem()
25
    {
26
        return $this->hasMany('Item', 'id');
27
    }
28
29
}