Entry.php 565 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Entry extends Model
{
10
11
    protected $fillable = ['door_id', 'user_id', 'success'];

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function door(): BelongsTo
    {
        return $this->belongsTo(Door::class);
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }
}