src/Models/Permission.php 1 location
|
@@ 24-31 (lines=8) @@
|
| 21 |
|
|
| 22 |
|
public $guarded = ['id']; |
| 23 |
|
|
| 24 |
|
public function __construct(array $attributes = []) |
| 25 |
|
{ |
| 26 |
|
$attributes['guard_name'] = $attributes['guard_name'] ?? config('auth.defaults.guard'); |
| 27 |
|
|
| 28 |
|
parent::__construct($attributes); |
| 29 |
|
|
| 30 |
|
$this->setTable(config('permission.table_names.permissions')); |
| 31 |
|
} |
| 32 |
|
|
| 33 |
|
public static function create(array $attributes = []) |
| 34 |
|
{ |
src/Models/Role.php 1 location
|
@@ 23-30 (lines=8) @@
|
| 20 |
|
|
| 21 |
|
public $guarded = ['id']; |
| 22 |
|
|
| 23 |
|
public function __construct(array $attributes = []) |
| 24 |
|
{ |
| 25 |
|
$attributes['guard_name'] = $attributes['guard_name'] ?? config('auth.defaults.guard'); |
| 26 |
|
|
| 27 |
|
parent::__construct($attributes); |
| 28 |
|
|
| 29 |
|
$this->setTable(config('permission.table_names.roles')); |
| 30 |
|
} |
| 31 |
|
|
| 32 |
|
public static function create(array $attributes = []) |
| 33 |
|
{ |