migrant-web/app/Models/Announcement.php
2026-06-10 16:14:59 +05:30

38 lines
702 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Announcement extends Model
{
use HasFactory;
protected $fillable = [
'title',
'body',
'type',
'employer_id',
'sponsor_id',
'status',
'remarks',
];
/**
* Get the employer that created the announcement.
*/
public function employer()
{
return $this->belongsTo(User::class, 'employer_id');
}
/**
* Get the sponsor that created the announcement.
*/
public function sponsor()
{
return $this->belongsTo(Sponsor::class, 'sponsor_id');
}
}