Skip to content

Commit

Permalink
Merge pull request #2098 from adiafora/fix_config
Browse files Browse the repository at this point in the history
Avoid calling the config helper in the role/perm model constructor
  • Loading branch information
drbyte committed Oct 19, 2022
2 parents 1ed2b83 + 411eeca commit 5e96846
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/Models/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ class Permission extends Model implements PermissionContract

public function __construct(array $attributes = [])
{
$attributes['guard_name'] = $attributes['guard_name'] ?? config('auth.defaults.guard');

parent::__construct($attributes);

$this->guarded[] = $this->primaryKey;
Expand Down
2 changes: 0 additions & 2 deletions src/Models/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ class Role extends Model implements RoleContract

public function __construct(array $attributes = [])
{
$attributes['guard_name'] = $attributes['guard_name'] ?? config('auth.defaults.guard');

parent::__construct($attributes);

$this->guarded[] = $this->primaryKey;
Expand Down

0 comments on commit 5e96846

Please sign in to comment.