MIF_E31211891/app/Models/Pengajuan.php

45 lines
824 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Pengajuan extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'pengajuan';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'id_mahasiswa',
'id_dosen_pembimbing',
'judul',
'jumlah_bimbingan',
'status',
];
/**
* Get the mahasiswa for the pengajuan.
*/
public function mahasiswa()
{
return $this->belongsTo(User::class, 'id_mahasiswa');
}
/**
* Get the dosen pembimbing for the pengajuan.
*/
public function dosenPembimbing()
{
return $this->belongsTo(User::class, 'id_dosen_pembimbing');
}
}