Show HN: Content Negotiation in PHP – API Without API (Symfony, Laravel, Temma)

I'm preparing a talk on APIs for AFUP Day, the French PHP conference. One of the topics I'll cover is content negotiation: making your website serve both HTML and JSON from the same endpoints, depending on what the client requests via the Accept header. This avoids building and maintaining a separate API alongside your website. The post shows the same example implemented in Symfony, Laravel and Temma, from explicit conditional code to a fully declarative approach.
3 points amaury_bouchard 7 months ago 0 comments

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton