This commit is contained in:
lexx committed 2023-10-02 23:10:49 +03:00
commit c6cb488379
255 files changed
+18731

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
<?php
namespace Lucent\Account;
use Lucent\Primitive\Collection;
readonly class AccountService
{
public function __construct(
private UserRepo $userRepo,
)
{
}
/**
* @return Collection<User>
*/
public function all(): Collection
{
return $this->userRepo->all();
}
/**
* @return Collection<UserProfile>
*/
public function allProfiles(): Collection
{
return $this->all()->map(fn($user) => $user->safe());
}
}