Role   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A permissions() 0 4 1
1
<?php
2
3
namespace Yard8\LaravelPermissions\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Role extends Model
8
{
9
    /**
10
     * Indicates if the model should be timestamped.
11
     *
12
     * @var bool
13
     */
14
    public $timestamps = false;
15
16
    /**
17
     * The attributes that are mass assignable.
18
     *
19
     * @var array
20
     */
21
    protected $fillable = [
22
        'name'
23
    ];
24
25
    /**
26
     * Get the permissions this role has by default.
27
     */
28
    public function permissions()
29
    {
30
        return $this->belongsToMany(Permission::class);
31
    }
32
}
33