Passed
Branch master (9edb23)
by Provinsi
06:28 queued 03:41
created

Anggaran   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
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
        'user_id',
21
        'label',
22
        'description'
23
    ];
24
25
    public function group_egovernment()
26
    {
27
        return $this->belongsTo('Bantenprov\GroupEgovernment\Models\Bantenprov\GroupEgovernment\GroupEgovernment','group_egovernment_id');
28
    }
29
30
    public function user()
31
    {
32
        return $this->belongsTo('App\User','user_id');
33
    }
34
}
35