Completed
Push — master ( a19a47...15bbc5 )
by Arjay
15:59
created

Guest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A roles() 0 4 1
1
<?php
2
3
namespace Yajra\CMS\Entities;
4
5
use App\User;
6
use Yajra\Acl\Models\Role;
7
8
class Guest extends User
9
{
10
    /**
11
     * @var string
12
     */
13
    protected $table = 'users';
14
15
    /**
16
     * @var string
17
     */
18
    protected $primaryKey = 'id';
19
20
    /**
21
     * Model can have many roles.
22
     *
23
     * @return \Illuminate\Database\Eloquent\Model
24
     */
25
    public function roles()
26
    {
27
        return $this->belongsToMany(config('acl.role', Role::class), 'role_user', 'user_id', 'role_id')->withTimestamps();
28
    }
29
}
30