Jump to ratings and reviews
Rate this book

Laravel Eloquent Recipes

Rate this book
Eloquent is the most important part of our favorite framework. As a Laravel developer, you need to know it very well.

This short PDF contains 35 top-performing Eloquent-related tips. They earned 100000s impressions and 1000s likes on Twitter.

Delivered to you in 4 categories.
Basic Eloquent Recipes
- How to use the new Attribute cast in Laravel 8
- How to avoid if-else statements with the when helper
- Or 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 whereBelongsTo
- How you can write custom relationship logic using the 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

These Eloquent tips will help you write cleaner, more efficient code.

34 pages, ebook

Published January 25, 2022

3 people want to read

About the author

Martin Joo

7 books4 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
0 (0%)
4 stars
0 (0%)
3 stars
0 (0%)
2 stars
0 (0%)
1 star
0 (0%)
No one has reviewed this book yet.

Can't find what you're looking for?

Get help and learn more about the design.