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.