Completed
Push — master ( 7fcc49...0a3113 )
by
unknown
10s
created

Kecamatan   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A desa() 0 3 1
A kabupaten() 0 3 1
1
<?php namespace Bantenprov\WilayahIndonesia\Models;
2
3
use Illuminate\Database\Eloquent\Model;
4
5
/**
6
 * The WilayahIndonesiaModel class.
7
 *
8
 * @package Bantenprov\WilayahIndonesia
9
 * @author  bantenprov <[email protected]>
10
 */
11
class Kecamatan extends Model
12
{
13
    /**
14
    * Table name.
15
    *
16
    * @var string
17
    */
18
    protected $table = 'districts';
19
20
    /**
21
    * The attributes that are mass assignable.
22
    *
23
    * @var mixed
24
    */
25
    protected $fillable = [];
26
27
    /**
28
     * The attributes that should be hidden for arrays.
29
     *
30
     * @var array
31
     */
32
    protected $hidden = [];
33
	
34
	public function desa(){
35
		return $this->hasMany('Bantenprov\WilayahIndonesia\Models\Desa','district_id');
36
	}
37
38
	public function kabupaten(){
39
		return $this->belongsTo('Bantenprov\WilayahIndonesia\Models\Kabupaten','city_id');
40
	}
41
	
42
}