| @@ 8-36 (lines=29) @@ | ||
| 5 | use Illuminate\Database\Eloquent\Model; |
|
| 6 | use Illuminate\Database\Eloquent\SoftDeletes; |
|
| 7 | ||
| 8 | class Akademik extends Model |
|
| 9 | { |
|
| 10 | use SoftDeletes; |
|
| 11 | ||
| 12 | public $timestamps = true; |
|
| 13 | ||
| 14 | protected $table = 'akademiks'; |
|
| 15 | protected $dates = [ |
|
| 16 | 'deleted_at' |
|
| 17 | ]; |
|
| 18 | protected $fillable = [ |
|
| 19 | 'siswa_id', |
|
| 20 | 'bahasa_indonesia', |
|
| 21 | 'bahasa_inggris', |
|
| 22 | 'matematika', |
|
| 23 | 'user_id' |
|
| 24 | ||
| 25 | ]; |
|
| 26 | ||
| 27 | public function siswa() |
|
| 28 | { |
|
| 29 | return $this->belongsTo('Bantenprov\Siswa\Models\Bantenprov\Siswa\Siswa','siswa_id'); |
|
| 30 | } |
|
| 31 | ||
| 32 | public function user() |
|
| 33 | { |
|
| 34 | return $this->belongsTo('App\User','user_id'); |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||
| @@ 8-37 (lines=30) @@ | ||
| 5 | use Illuminate\Database\Eloquent\Model; |
|
| 6 | use Illuminate\Database\Eloquent\SoftDeletes; |
|
| 7 | ||
| 8 | class Nilai extends Model |
|
| 9 | { |
|
| 10 | use SoftDeletes; |
|
| 11 | ||
| 12 | public $timestamps = true; |
|
| 13 | ||
| 14 | protected $table = 'nilais'; |
|
| 15 | protected $dates = [ |
|
| 16 | 'deleted_at' |
|
| 17 | ]; |
|
| 18 | protected $fillable = [ |
|
| 19 | 'user_id', |
|
| 20 | 'siswa_id', |
|
| 21 | 'akademik', |
|
| 22 | 'prestasi', |
|
| 23 | 'zona', |
|
| 24 | 'sktm' |
|
| 25 | ||
| 26 | ]; |
|
| 27 | ||
| 28 | public function siswa() |
|
| 29 | { |
|
| 30 | return $this->belongsTo('Bantenprov\Siswa\Models\Bantenprov\Siswa\Siswa','siswa_id'); |
|
| 31 | } |
|
| 32 | ||
| 33 | public function user() |
|
| 34 | { |
|
| 35 | return $this->belongsTo('App\User','user_id'); |
|
| 36 | } |
|
| 37 | } |
|
| 38 | ||