Skip to content

Instantly share code, notes, and snippets.

@ricfrank
Last active August 29, 2015 14:16
Show Gist options
  • Save ricfrank/e2d4f1229ac2084720bf to your computer and use it in GitHub Desktop.
Save ricfrank/e2d4f1229ac2084720bf to your computer and use it in GitHub Desktop.
//controller
public function retrieveLastOrderForCustomerAction(customerId)
{
$order = $this->getManager()
->getRepository('AppBundle:Order')
->findLastByCustomer(customerId);
if (! order) {
...
}
return $this->render(
'order/retrieveLastOrderForCustomer.html.twig',
array(
'orderFound' => OrderFoundViewModel::createFromOrder(order)
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment