rbrecruiter/app/Appointment.php

32 lines
681 B
PHP
Raw Normal View History

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Appointment extends Model
{
public $fillable = [
2020-09-02 23:23:09 +00:00
'appointmentDescription',
'appointmentDate',
'applicationID',
'appointmentStatus',
2020-09-02 23:23:09 +00:00
'appointmentLocation',
'meetingNotes',
'userAccepted'
];
public function application()
{
// FIXME: Possible bug here, where laravel looks for the wrong column in the applications table.
return $this->belongsTo('App\Application', 'id', 'applicationID');
}
public function setStatus($status)
{
$this->update([
'appointmentStatus' => $status
]);
}
}