Completed
Push — master ( 16a780...93f96a )
by claudio
05:57
created

Timeslot::calendar()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace plunner;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
/**
8
 * Class Timeslot
9
 *
10
 * @author Claudio Cardinale <[email protected]>
11
 * @copyright 2015 Claudio Cardinale
12
 * @version 1.0.0
13
 * @package plunner
14
 * @property integer $id
15
 * @property string $time_start
16
 * @property string $time_end
17
 * @property integer $calendar_id
18
 * @property \Carbon\Carbon $created_at
19
 * @property \Carbon\Carbon $updated_at
20
 * @property-read \plunner\Calendar $calendar
21
 */
22
class Timeslot extends Model
23
{
24
    /**
25
     * The attributes that are mass assignable.
26
     *
27
     * @var array
28
     */
29
    protected $fillable = ['time_start', 'time_end'];
30
31
    /**
32
     * The attributes excluded from the model's JSON form.
33
     *
34
     * @var array
35
     */
36
    protected $hidden = ['pivot', 'calendar'];
37
38
    /**
39
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
40
     */
41 8
    public function calendar()
42
    {
43 8
        return $this->belongsTo('plunner\Calendar');
44
    }
45
}
46