Skip to content

Instantly share code, notes, and snippets.

@cosmeoes
Created May 16, 2023 01:18
Show Gist options
  • Save cosmeoes/41383ffa3b138a74ff92690fb387cb43 to your computer and use it in GitHub Desktop.
Save cosmeoes/41383ffa3b138a74ff92690fb387cb43 to your computer and use it in GitHub Desktop.
Eloquent Beyond The Basics 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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment