Permission::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace EmilMoe\Guardian\Http\Models;
4
5
use EmilMoe\Guardian\Support\Guardian;
6
use Illuminate\Database\Eloquent\Model;
7
8
class Permission extends Model
9
{
10
    /**
11
     * The table associated with the model.
12
     *
13
     * @var string
14
     */
15
    protected $table;
16
17
    /**
18
     * The attributes that are mass assignable.
19
     *
20
     * @var array
21
     */
22
    protected $fillable = ['name'];
23
24
    /**
25
     * Create a new Permission model instance.
26
     *
27
     * @param array $attributes
28
     */
29
    public function __construct(array $attributes = [])
30
    {
31
        $this->table = Guardian::getPermissionTable();
32
        parent::__construct($attributes);
33
    }
34
}