Description
In this episode, you'll learn step-by-step how to create a custom resource in Sylius – using "Brand" as a real-world example. This is a hands-on guide to extending Sylius' data model using the Resource Bundle, giving you full CRUD functionality with minimal code.
You’ll discover:
- How to design a brand entity with fields like name and a unique human-readable code.
- How to register your entity as a Sylius resource and automatically gain a controller, form, factory, and repository.
- How to update the database and verify your resource using Symfony console commands.
- How to create a simple CLI command to test the resource logic by interacting with the repository, factory, and manager services.
- Which Sylius and Symfony interfaces to implement to keep your resource consistent with best practices.
This episode is the foundation for building custom domain logic in Sylius with clean, structured, and automated setups.