Description
In this episode, you’ll learn how the Resource Controller works in Sylius – the default system for handling routes and actions for your resources. It’s a core part of Sylius that automates CRUD in the admin panel, so you can focus on business logic instead of writing repetitive code.
You’ll learn:
- How the controller generated by the Sylius Resource Bundle works.
- Which actions (e.g., createAction, updateAction, showAction) are available out of the box.
- How to configure your own routes and connect them to the controller, template, and HTTP method.
- How to prepare custom templates (like create.html.twig, show.html.twig) to work with the controller.
- How Sylius automatically renders forms and detects fields, including built-in CSRF protection.
- How to reduce configuration using Sylius's built-in resource routing and views.
This hands-on episode shows how to create a fully functional CRUD interface for your resource, fast and clean – without building the controller manually.