Create User Zone

This commit is contained in:
omair saleh
2022-09-25 03:46:14 +08:00
parent 8143e2b9a2
commit b008ad5106
59 changed files with 1757 additions and 12 deletions
@@ -0,0 +1,25 @@
<?php
namespace Src\Zone\User\Application\UseCases\Queries;
use Src\Zone\User\Domain\Policies\UserPolicy;
use Src\Zone\User\Domain\Repositories\UserRepositoryInterface;
use Src\Common\Domain\QueryInterface;
class FindAllUsersQuery implements QueryInterface
{
private UserRepositoryInterface $repository;
private UserPolicy $policy;
public function __construct()
{
$this->repository = app()->make(UserRepositoryInterface::class);
$this->policy = new UserPolicy();
}
public function handle(): array
{
authorize('findAll', $this->policy);
return $this->repository->findAll();
}
}