What is the 'Repository Pattern,' and why do some developers argue it is redundant when using Laravel's Eloquent ORM?

Last updated 15 June 2026

  • The Repository Pattern adds a layer (e.g. findActiveUsers()) between app code and the data source, centralizing queries behind an interface for easy swapping and mocking.

  • Critics call it redundant because Eloquent (an active-record ORM) is already an abstraction. Wrapping it hides features like scopes, eager loading, and relationships, and DB swaps rarely happen.

  • Middle ground: use it for complex domain logic or real decoupling needs, and skip it for simple CRUD apps.

  • https://www.reddit.com/r/PHP/comments/1p6bprs/why_dont_major_companies_invest_in_phps_evolution/
  • https://www.reddit.com/r/PHP/comments/1bp7tfh/what_is_the_future_of_php/
All PHP interview questions