Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* @Route('/users', methods={'POST'})
*/
class RegisterUserController
{
private RegisterUserService $service;
public function __construct(RegisterUserService $service) { ... }
public function __invoke(Request $request)
{
$this->service->register( ... );
}
}
/**
* @Route('/users', methods={'GET'})
*/
class GetUserListController
{
private ListUserService $service;
public function __construct(ListUserService $service) { ... }
public function __invoke(Request $request)
{
$this->service->getUserList( ... );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.