Skip to content

Commit

Permalink
fix TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
toyi committed Oct 28, 2021
1 parent ce84772 commit 1ab0dbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HasIdentifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static function getIdentifierKey(): string
* @param array $attributes
* @return mixed
*/
public static function getModelByIdentifier(string $identifier, array $attributes = ['*']): static
public static function getModelByIdentifier(string $identifier, array $attributes = ['*']): ?static
{
return static::query()->where(static::getIdentifierKey(), '=', $identifier)->first($attributes);
}
Expand Down

0 comments on commit 1ab0dbf

Please sign in to comment.