Completed
Push — master ( 188db0...1c1a8a )
by
unknown
02:37 queued 01:14
created

OrangTua::siswa()   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\OrangTua\Models\Bantenprov\OrangTua;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
/**
8
 * The OrangTua class.
9
 *
10
 * @package Bantenprov\OrangTua
11
 * @author  bantenprov <[email protected]>
12
 */
13
14
class OrangTua extends Model
15
{
16
   
17
18
    protected $table = 'orangtuas';
19
    
20
    protected $fillable = [
21
        'siswa_id',
22
        'alamat_ortu',
23
        'nama_ayah',
24
        'nama_ibu',
25
        'kerja_ayah',
26
        'pendidikan_ayah',
27
        'kerja_ibu',
28
        'pendidikan_ibu',
29
        'no_telp',
30
        'user_id'
31
32
    ];
33
    
34
    public function user()
35
    {
36
        return $this->belongsTo('App\User','user_id');
37
    }
38
39
    public function siswa()
40
    {
41
        return $this->belongsTo('Bantenprov\Siswa\Models\Bantenprov\Siswa\Siswa','siswa_id');
42
    }
43
}
44