Refactor: responses as ActivitesAttended

This commit is contained in:
Sallu9007
2025-03-23 16:18:07 +05:30
parent e27937c29f
commit 8c4e18e702
13 changed files with 72 additions and 72 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ActivitiesAttended 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');
}
}