Created
July 28, 2021 16:39
-
-
Save dgafka/ab4d879d79514c658297a3ebc40328b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class PersonController | |
{ | |
public function __construct(private QueryBus $queryBus) {} | |
public function getShippingAddress(Request $request) | |
{ | |
$userId = $request->get('userId'); | |
$shippingAddress = $this->queryBus->send(new GetUserShippingAddressQuery($userId)); | |
// serialize if needed and return response | |
return new Response($shippingAddress); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment