Completed
Push — master ( 0bec88...46c94e )
by David Martínez
02:07
created

Desiratum::timeslots()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
ccs 0
cts 4
cp 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Scool\Timetables\Models;
4
5
use Acacha\Names\Traits\Nameable;
6
use Acacha\Stateful\Traits\StatefulTrait;
7
use Illuminate\Database\Eloquent\Model;
8
9
class Desiratum extends Model
10
{
11
    use Nameable, StatefulTrait;
12
13
    protected $fillable = [
14
        'torn', 'name',
15
    ];
16
17
    //TODO falta la relació completa, falta la classe Timeslot. Traits
18
    /**
19
     * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
20
     */
21
    public function timeslots()
22
    {
23
        return $this->belongsToMany(App\Timeslot::class);
24
    }
25
}
26