Skip to content

Commit 5e96846

Browse files
authored
Merge pull request #2098 from adiafora/fix_config
Avoid calling the config helper in the role/perm model constructor
2 parents 1ed2b83 + 411eeca commit 5e96846

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

src/Models/Permission.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ class Permission extends Model implements PermissionContract
2222

2323
public function __construct(array $attributes = [])
2424
{
25-
$attributes['guard_name'] = $attributes['guard_name'] ?? config('auth.defaults.guard');
26-
2725
parent::__construct($attributes);
2826

2927
$this->guarded[] = $this->primaryKey;

src/Models/Role.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ class Role extends Model implements RoleContract
2222

2323
public function __construct(array $attributes = [])
2424
{
25-
$attributes['guard_name'] = $attributes['guard_name'] ?? config('auth.defaults.guard');
26-
2725
parent::__construct($attributes);
2826

2927
$this->guarded[] = $this->primaryKey;

0 commit comments

Comments
 (0)