symfony3 Routing Powerful Rest Routes

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

Traditionally, you can use routing to map an the request with the Routing Component who handled request and response parameters by HttpFoundation Component.

Additionally, a custom route parameter can be created by using the FOSRestBundle to extends the default functionalities of the Routing Component.

This is useful for creating REST routes, an really useful to specify how to tranfer structured data like XML or json file in a request (and a response).

See FOSRestBundle Doc for more information, and especially this annotation :

use FOS\RestBundle\Controller\Annotations\FileParam;

/**
 * @FileParam(
 *   name="",
 *   key=null,
 *   requirements={},
 *   default=null,
 *   description="",
 *   strict=true,
 *   nullable=false,
 *   image=false
 * )
 */


Got any symfony3 Question?