This post was originally published on https://blog.eichgi.com/laravel-beyond-crud-imo
Folks, today's opinion is about the Laravel Beyond CRUD course published by Spatie. As Freek said, if you work with Laravel chances are you are using one of their many libraries for the Laravel ecosystem.
Link to the course: laravel-beyond-crud.com
This is a video series & book that provides a mindset when it comes to work with large projects using the Laravel Framework. The entry point is related with Domain Driven Design (DDD) and how could it be applied into the Laravel context. I expected to have some code examples in order to see how the wiring up needs to be modified when connecting the domains modularization and laravel's inner functionality. At the end it's a good overview.
The next episode shows what a Data Transfer Object (DTO) is and its advantages. Having defined a known data structure for data transfer helps to handle communication; a common case is data storage from the request to the controller. Instead of grabbing data manually, you are able to curate it or transform it before its final usage. And testing might get easier given you always know what to provide and expect.
In order to not disclose or diving deeper into the course I will stop here. But the following are some points and it's a part of what you can find in this course:
- Keeping model classes small and clean
- Structuring complex queries
- Passing data around in a structured way using Data Transfer Objects
- How to make code reusable by using actions
- Improving code clarity by using meaningful names
- Keep controllers light by using view models
- Adding behaviour to collections
- Testing actions, DTOs and model-related classes
- Using enhanced test factories to seed data for every scenario
I believe this is a great content whereas you are becoming proficient with Laravel or if you wishes to know the advanced topics. As mentioned previously I'd like to had more content but the course goal is to show off some techniques, patterns and good practices for your projects. Feel free to share your comments 😎
Top comments (0)