Completed
Pull Request — master (#107)
by Glenn
15:22 queued 07:05
created

DepartmentMembers::members()   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
/**
8
 * @property mixed departmentid
9
 * @property mixed userid
10
 */
11
class DepartmentMembers extends Model
12
{
13
    /**
14
     * The database table used by the model.
15
     *
16
     * @var string
17
     */
18
    protected $table = 'department_members';
19
    
20
    /**
21
     * members relation.
22
     *
23
     * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
24
     */
25
    public function members()
26
    {
27
        return $this->belongsToMany('App\DepartmentMembers');
28
    }
29
30
    /**
31
     * teams relation.
32
     *
33
     * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
34
     */
35
    public function teams()
36
    {
37
        return $this->belongsToMany('App\Teams');
38
    }
39
}
40