Completed
Push — master ( a9c3e9...762030 )
by
unknown
9s
created

Siswa::sekolah()   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\Siswa\Models\Bantenprov\Siswa;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\SoftDeletes;
7
8
class Siswa extends Model
9
{
10
    use SoftDeletes;
11
12
    public $timestamps = true;
13
14
    protected $table = 'siswas';
15
    protected $dates = [
16
        'deleted_at'
17
    ];
18
    protected $fillable = [
19
        'nomor_un',
20
        'nik',
21
        'nama_siswa',
22
        'no_kk',
23
        'alamat_kk',
24
        'province_id',
25
        'city_id',
26
        'district_id',
27
        'village_id',
28
        'tempat_lahir',
29
        'tgl_lahir',
30
        'jenis_kelamin',
31
        'agama',
32
        'nisn',
33
        'tahun_lulus',
34
        'sekolah_id',
35
        'user_id'  
36
        
37
    ];
38
39
       public function user()
40
    {
41
        return $this->belongsTo('App\User','user_id');
42
    }
43
44
    public function sekolah()
45
    {
46
        return $this->belongsTo('Bantenprov\Sekolah\Models\Bantenprov\Sekolah\Sekolah','sekolah_id');
47
    }
48
49
}
50