src/Models/Permission.php 1 location
|
@@ 19-28 (lines=10) @@
|
16 |
|
|
17 |
|
public $guarded = ['id']; |
18 |
|
|
19 |
|
public function __construct(array $attributes = []) |
20 |
|
{ |
21 |
|
if (empty($attributes['guard_name'])) { |
22 |
|
$attributes['guard_name'] = config('auth.defaults.guard'); |
23 |
|
} |
24 |
|
|
25 |
|
parent::__construct($attributes); |
26 |
|
|
27 |
|
$this->setTable(config('permission.table_names.permissions')); |
28 |
|
} |
29 |
|
|
30 |
|
/** |
31 |
|
* A permission can be applied to roles. |
src/Models/Role.php 1 location
|
@@ 20-29 (lines=10) @@
|
17 |
|
|
18 |
|
public $guarded = ['id']; |
19 |
|
|
20 |
|
public function __construct(array $attributes = []) |
21 |
|
{ |
22 |
|
if (empty($attributes['guard_name'])) { |
23 |
|
$attributes['guard_name'] = config('auth.defaults.guard'); |
24 |
|
} |
25 |
|
|
26 |
|
parent::__construct($attributes); |
27 |
|
|
28 |
|
$this->setTable(config('permission.table_names.roles')); |
29 |
|
} |
30 |
|
|
31 |
|
/** |
32 |
|
* A role may be given various permissions. |