Skip to content

How can I return with an array of users #27

@TheGeekyM

Description

@TheGeekyM

In all of your examples in application services you illustrate how to return a DTO but with one user
so I need to know how to return a collection of users

this is what you did with one user, or in another example, you return a user transformer:

class SignUpUserService
{
    public function execute(SignUpUserRequest $request)
    {
// ...
        $user = // ...
        return new UserDTO($user);
    }
}

and what should to be done in pagination?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions