blob: 900506968962c2c3b69411f0153a6e79698003f3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Appointment extends Model
{
// Velden die massaal ingevuld mogen worden (via create of update)
protected $fillable = [
'student_id',
'company_id',
'time_slot',
];
// Relatie: een appointment hoort bij één student
public function student(): BelongsTo
{
return $this->belongsTo(Student::class);
}
// Relatie: een appointment hoort bij één bedrijf
public function company(): BelongsTo
{
return $this->belongsTo(Company::class);
}
}
|