Test Setup Failed
Push — development ( 84aced...e2681b )
by Tim
05:18
created

Teams::departments()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Teams extends Model
8
{
9
    /**
10
     * The database table used by the model.
11
     *
12
     * @var string
13
     */
14
    protected $table = 'teams';
15
16
    /**
17
     * The attributes that are mass assignable.
18
     *
19
     * @var array
20
     */
21
    protected $fillable = ['name', 'manager', 'description'];
22
23
    /**
24
     * Departements relation.
25
     *
26
     * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
27
     */
28
    public function departments()
29
    {
30
        return $this->belongsToMany('App\Departments');
31
    }
32
33
    /**
34
     * The employees relation.
35
     *
36
     * Get all the employees setted on the teams.
37
     *
38
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
39
     */
40
    public function employee()
41
    {
42
43
    }
44
}
45