Eloquent Beyond The Basics

Learn how to use the power of Eloquent beyond the simple tutorials

Buy now

"When I use joins I get soft-deleted records, why does this happen?"

The first time you learn how to use the Eloquent ORM, the examples you encounter are for simple apps (ie: a simple CRUD website), which is fine, but you might find yourself struggling when you have to do something more complex than simply filtering result by one field or getting a model by its id.

Everyone always says to just read the docs (you should do that), but it's hard to know what to search for in the docs if you don't understand how Eloquent works and how the different parts of Eloquent fit together.

Wouldn't it be nice to understand what's happening when you make a query?

That's why I decided to write this book.

Table Of Contents

  • The Laravel Query Builder
    • How does it work?
      • Bindings
    • Raw queries
    • Subqueries
      • Aggregates
  • Eloquent
    • What's an ORM?
    • What's the relationship between Eloquent and the query builder?
      • Where is the where?
      • Magic methods
      • Back to the model
      • The Eloquent Query Builder
    • Why choose Eloquent over the query builder
      • Differences
      • Benefits of Eloquent
      • Drawbacks of Eloquent
  • Working with Pivot Tables
    • Basic Usage
    • Adding timestamps
      • Ordering by a pivot table
    • Adding more fields to the pivot table
    • Pivot table models
  • Scopes
    • Local scopes
      • How to define a local scopes
      • Combining local scopes
    • Or where scope
    • Global scopes
      • Disable Global Scopes
      • Soft Deletes: Laravel's use of global scopes
  • Aggregates
    • Basic use
    • Aggregates and Eloquent relations
      • Other aggregate functions
    • Aggregates using group by and raw queries
  • Joins
    • Inner Join
    • Left And Right Joins
    • Cross joins
    • Filtering with joins
    • Should you use joins with Eloquent?
Get Eloquent Beyond The Basics
Understand how Eloquent works under the hood
Instant access to the ebook in PDF and HTML formats

FAQ

Do you offer a refund?
Yes! Simply email [email protected] (or DM) within 15 days from the purchase and I will issue a refund. No questions asked.

Do you offer purchase parity pricing?
Yes! If you are in one of the supported countries a banner should appear on the top of the page with a discount code. If for some reason you think your country should offer a discount code and you don't see the banner send me an email at [email protected] and we can figure something out.

Can I purchase multiple licenses for my team at a reduced price?
Yes, after you click the "buy now" button pick the package depending on the amount of licenses you need. After purchasing, you can download and distribute the codes as you see fit.