You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
485 B
PHTML
27 lines
485 B
PHTML
6 years ago
|
<?php
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||
|
|
||
|
class Kelas extends Model
|
||
|
{
|
||
|
use SoftDeletes;
|
||
|
|
||
|
protected $table = 'kelas';
|
||
|
|
||
|
protected $fillable = [
|
||
|
'periode_id',
|
||
|
'nama'
|
||
|
];
|
||
|
|
||
|
public function siswa(){
|
||
|
return $this->hasMany('App\Models\Siswa','kelas_id','id');
|
||
|
}
|
||
|
|
||
|
public function periode(){
|
||
|
return $this->hasOne('App\Models\Periode','id','periode_id');
|
||
|
}
|
||
|
}
|