diff --git a/packages/framework/src/Framework/Features/Blogging/Models/PostAuthor.php b/packages/framework/src/Framework/Features/Blogging/Models/PostAuthor.php index e4886181eb1..ec6b25cad15 100644 --- a/packages/framework/src/Framework/Features/Blogging/Models/PostAuthor.php +++ b/packages/framework/src/Framework/Features/Blogging/Models/PostAuthor.php @@ -71,7 +71,9 @@ public static function get(string $username): static /** @return \Illuminate\Support\Collection<\Hyde\Framework\Features\Blogging\Models\PostAuthor> */ public static function all(): Collection { - return new Collection(Config::getArray('hyde.authors', [])); + return (new Collection(Config::getArray('hyde.authors', [])))->mapWithKeys(function (self $author): array { + return [$author->username => $author]; + }); } public function __toString(): string