From 1ab0dbf867303913006a832127763071fb9558dc Mon Sep 17 00:00:00 2001 From: Anthony Aslangul Date: Thu, 28 Oct 2021 16:17:19 +0200 Subject: [PATCH] fix TypeError --- src/HasIdentifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HasIdentifier.php b/src/HasIdentifier.php index 38a11d4..25adbe1 100644 --- a/src/HasIdentifier.php +++ b/src/HasIdentifier.php @@ -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); }