equip / framework

A tiny, yet powerful, PHP micro-framework.
http://equip.github.io
MIT License
118 stars 27 forks source link

Output as HTML #73

Closed designermonkey closed 8 years ago

designermonkey commented 8 years ago

I have tried to read the docs, and tried to get a handle on how to just output html, and I just can't for the life of me figure out how.

Any helpers?

shadowhand commented 8 years ago

This is controlled by the Responders. We allow for Plates to be used, see http://equipframework.readthedocs.io/en/latest/#using-plates

ameech commented 8 years ago

@designermonkey, were you able to figure it out?

designermonkey commented 8 years ago

I'll be honest, I haven't had the time to look again; it's a personal project.

I'll close this though.

pintomau commented 7 years ago

Activate PlatesConfiguration and PlatesResponderConfiguration in index.php.

PlatesConfiguration uses the PLATES_DIRECTORY env variable, so make sure to set it in your .env.

In the payload set which template to use ->withSetting('template', 'someTemplate').

After this, if you have to set the request headers accordingly to return as JSON.