$0+

Laravel Eloquent Recipes

27 ratings
I want this!

Laravel Eloquent Recipes

$0+
Martin Joo
27 ratings

39 Tips and Tricks to Mastering Laravel's Eloquent ORM

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 39 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.

$
I want this!
Size
449 KB
Length
39 pages

Ratings

4.9
(27 ratings)
5 stars
93%
4 stars
7%
3 stars
0%
2 stars
0%
1 star
0%
Powered by