DEV Community

Cover image for A Searchable Laravel Eloquent Cheat Sheet for Your Daily Workflow
Andréia Bohner
Andréia Bohner

Posted on

A Searchable Laravel Eloquent Cheat Sheet for Your Daily Workflow

Eloquent covers a lot of ground. Between query building, model events, relationships, chunking, serialization, and now vector similarity, there's plenty to keep in your head, and most of us don't use every part of it every day.

So I built a searchable reference that puts all of it in one place, to quickly find what you need:

👉 https://devdeia.com/cheat-sheets/laravel/

What it is

A searchable reference spanning the full Eloquent method set: 27 groups, hundreds of methods, all on one page. It has dark and light modes, which follow your system preference automatically, with a manual toggle if you want to override it.

You'll find everything from the methods you use daily to the ones you reach for less often:

  • Retrieving, filtering (WHERE, date clauses), ordering, aggregates
  • Inserts, updates, upserts, deletes, soft deletes
  • Joins, unions, raw expressions
  • Transactions, pagination, chunking & lazy iteration
  • Eager loading, relationships (attach/sync/associate)
  • Model events, serialization, debugging (->dd(), ->ddRawSql())
  • Eloquent collections
  • Vector similarity (->nearestNeighbors()) — because Laravel does AI now :)

Open source

The data lives in a separate public repository so anyone can contribute:

👉 https://github.com/andreia/laravel-eloquent-cheat-sheet

Found a missing method, a wrong description, or a typo? Contributions are welcome! Open a PR or an issue.

Have a suggestion? I'd love to hear :)

Top comments (0)