38 lines
747 B
PHP
38 lines
747 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Response extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'title',
|
|
'organising_institute',
|
|
'address',
|
|
'department_id',
|
|
'faculty_id',
|
|
'start_date',
|
|
'end_date',
|
|
'num_days',
|
|
'activity_type',
|
|
'category',
|
|
'level',
|
|
'proof',
|
|
];
|
|
|
|
|
|
// Define the relationship to the User (Faculty)
|
|
public function department()
|
|
{
|
|
return $this->belongsTo(Department::class, 'department_id');
|
|
}
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, 'faculty_id');
|
|
}
|
|
}
|