Answer the question
In order to leave comments, you need to log in
Where should transforms be placed in Services or in controllers?
Service example:
class CommonJobService implements CommonJobServiceInterface
{
public function getAll(): array
{
return (new CommonJobsTransformer)->transform(CommonJob::all()->sortByDESC('id'));
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question