~/talk

Using the Repository Pattern with Eloquent for Code That Lasts

TalkinItalianat LaravelDay 2017 · 2017-11-30..12-01· [php, laravel]
slides:none on file

Shows how to put a repository layer on top of Eloquent to isolate persistence and keep the Laravel app simple, so the storage driver can be swapped without changing many files. Recommends moving read/write queries into repositories, exposing only contract methods via repository interfaces, using value objects to ensure valid entities, and throwing exceptions on failures to ease migrations (e.g., legacy→microservice) and simplify testing.

AI-written summary · about

  1. 0:00Introduction
  2. 1:17Active Record limits
  3. 3:47Eloquent issues
  4. 6:56Repository Pattern
  5. 8:17Refactoring with Repository
  6. 10:43Complex queries
  7. 12:32Flexible repository interfaces
  8. 13:58Value Objects
  9. 17:36Repository benefits
  10. 19:23Migration example
  11. 20:07Testing with Repository
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.