Level Up Your Eloquent Game
39 awesome Eloquent tips to make your code better. Improve your code in a matter of hours.
★4.9 average rating. Read by 3000+ happy developers.
General Eloquent Recipes
Tips that make your code better and your day-to-day life eaiser.
Relationship Recipes
Working with Eloquent relationships is sometimes confusing. These tips will help you write more efficient code.
Factory and Migration Recipes
Make them cleaner to work with.
Other Eloquent Recipes
Other useful not-so-well-known Eloquent features and tips.
About The Book
"Laravel Eloquent Recipes" is a 38-page guide that teaches you 39 awesome but not-so-well-known Laravel Eloquent features and tips. They earned 100,000s impressions and 1,000s likes on Twitter.Delivered to you in 4 categories:
General Eloquent Recipes
How to use the new
Attribute
cast in Laravel 8How to avoid if-else statements with the
when
helperOr how to hide sensitive information with
invisible
columns
Relationship Recipes
How to avoid null checking with the
withDefault
How you can write high-level code using the
whereRelation
or whereBelongsToHow you can write custom relationship logic using
ofMany
Factory and Migration Recipes
How to write migrations that almost read like an English sentence
How you can save code with
Factory States
Other Eloquent Related Recipes
How to log every database query with 5 lines of code.
How to avoid N+1 queries
...and more. These Eloquent tips will help you write cleaner, more efficient code.
Download Now For Free
Get the 38-page book and level up your Eloquent game right now
Who Am I?
👋 Hey!I'm Martin Joo, a PHP developer since 2012. I'm also a content creator, blogger, and author of:
Domain-Driven Design with Laravel
DevOps with Laravel
Microservices with Laravel
Laravel Concepts
Test-Driven APIs with Laravel and Pest
Laravel Eloquent Recipes
Proper API Design with Laravel
Common Mistakes in Laravel
As you can see, I really love Laravel. I'm also sharing everything I know about development on Twitter.