<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
// use App\Models\Status;
class Task extends Model
{
use HasFactory;
protected $fillable = [
'task_details',
'assigned_to',
'phase',
'status',
'due_date',
];
// Define the relationship with the User model
public function admin()
{
return $this->belongsTo(Admin::class, 'assigned_to');
}
// public function status()
// {
// return $this->belongsTo(Status::class, 'status');
// }
}
|