Anggaran   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 32
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A sector_egovernment() 0 3 1
A group_egovernment() 0 3 1
A user() 0 3 1
1
<?php
2
3
namespace Bantenprov\Anggaran\Models\Bantenprov\Anggaran;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\SoftDeletes;
7
8
class Anggaran extends Model
9
{
10
    use SoftDeletes;
11
12
    public $timestamps = true;
13
14
    protected $table = 'anggarans';
15
    protected $dates = [
16
        'deleted_at'
17
    ];
18
    protected $fillable = [
19
        'group_egovernment_id',
20
        'sector_egovernment_id',
21
        'user_id',
22
        'label',
23
        'description',
24
        'link'
25
    ];
26
27
    public function group_egovernment()
28
    {
29
        return $this->belongsTo('Bantenprov\GroupEgovernment\Models\Bantenprov\GroupEgovernment\GroupEgovernment','group_egovernment_id');
30
    }
31
32
    public function sector_egovernment()
33
    {
34
        return $this->belongsTo('Bantenprov\SectorEgovernment\Models\Bantenprov\SectorEgovernment\SectorEgovernment','sector_egovernment_id');
35
    }
36
37
    public function user()
38
    {
39
        return $this->belongsTo('App\User','user_id');
40
    }
41
}
42