Skip to content

Commit

Permalink
Merge pull request #2216 from ejunker/patch-1
Browse files Browse the repository at this point in the history
Prevent `MissingAttributeException` for `guard_name`
  • Loading branch information
drbyte committed Oct 19, 2022
2 parents bc2227c + ecf27c5 commit 1ed2b83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Guard.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static function getNames($model): Collection
if (\method_exists($model, 'guardName')) {
$guardName = $model->guardName();
} else {
$guardName = $model->guard_name ?? null;
$guardName = $model->getAttributeValue('guard_name');
}
}

Expand Down

0 comments on commit 1ed2b83

Please sign in to comment.