I'm using Symfony2 and i need to use Curl to return Html from a Webservice, i tried to simply return $html
, but Symfony2 fired :
Uncaught PHP Exception InvalidArgumentException: "Unable to find template ""
any help will be appreciated . Thank you
Try:
class Controller
{
public function foo()
{
return new Response(
'<html><body>Hello</body></html>'
);
}
}
A controller in Symfony must always return a Response object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With