27 lines
467 B
PHP
27 lines
467 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',
|
|
];
|
|
|
|
/**
|
|
* Get the employer that created the announcement.
|
|
*/
|
|
public function employer()
|
|
{
|
|
return $this->belongsTo(User::class, 'employer_id');
|
|
}
|
|
}
|