MIF_E31221259/app/Models/HasilAhp.php

27 lines
517 B
PHP

<?php
// app/Models/HasilAhp.php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class HasilAhp extends Model
{
protected $table = 'hasil_ahp';
public $timestamps = true;
protected $fillable = ['user_id', 'jurusan_id', 'score', 'ranking'];
// Relasi ke User
public function user()
{
return $this->belongsTo(User::class);
}
// Relasi ke Jurusan
public function jurusan()
{
return $this->belongsTo(Jurusan::class, 'jurusan_id', 'id');
}
}