Skip to content

Instantly share code, notes, and snippets.

Last active Jul 15, 2019
What would you like to do?
class MakeCoolStuff extends AbstractController
public function __construct(
EntityManagerInterface $manager,
YourFunkyService $service
) {
$this->manager = $manager;
$this->service = $service;
public function __invoke(SomeEntityFormRequest $request, User $user): JsonResponse
$vacancy = $this->service->createFromRequest($request, $user);
return new JsonResponse([
'message' => 'Что-то там успешно создано!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment