Completed
Push — master ( da9adb...96fdd3 )
by
unknown
7s
created

SiswaModel::user()   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 namespace Bantenprov\Siswa\Models;
2
3
use Illuminate\Database\Eloquent\Model;
4
5
/**
6
 * The SiswaModel class.
7
 *
8
 * @package Bantenprov\Siswa
9
 * @author  bantenprov <[email protected]>
10
 */
11
class SiswaModel extends Model
12
{
13
    /**
14
    * Table name.
15
    *
16
    * @var string
17
    */
18
    protected $table = 'siswas';
19
20
    /**
21
    * The attributes that are mass assignable.
22
    *
23
    * @var mixed
24
    */
25
    protected $fillable = ['nomor_un','nik','label','nama_siswa','alamat_kk','tempat_lahir','tgl_lahir','jenis_kelamin','agama','nisn','tahun_lulus','description','user_id'];
26
27
    /**
28
     * The attributes that should be hidden for arrays.
29
     *
30
     * @var array
31
     */
32
    protected $hidden = [];
33
34
        public function user()
35
    {
36
        return $this->belongsTo('App\User','user_id');
37
    }
38
39
}
40