Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Repository Laravel Package

recca0120/repository

Laravel repository pattern package that decouples business logic from Eloquent models. Ships criteria, presenters, cache support, and Artisan generators to scaffold repositories and interfaces quickly, keeping controllers thin and testable.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Framework upgrade planning (the main driver here): v3.0 is essentially a Laravel 12 compatibility release. Because it is a major version bump, treat it as a signal that older Laravel versions were likely dropped from the support matrix. Before scheduling, confirm the actual composer.json constraints (illuminate/*, PHP minimum) against your own upgrade path — a Laravel 12 push is a cross-team roadmap item, not just a dependency bump.
  • Build vs. buy on the repository pattern: This package is a thin abstraction over Eloquent (interfaces + base repository for common CRUD/query methods). The buy case is skipping boilerplate; the build case is that a repository layer is ~100 lines of your own code and you may want tighter control over return types, caching, and criteria/filter semantics.
  • Testability and domain decoupling: Use as a lever for a "swap or mock the data layer" decision — interfaces let you bind in-memory or fake repositories in tests, and give you an escape hatch if a domain outgrows Eloquent. Good justification for teams standardizing on a data-access convention.
  • Architecture standardization / onboarding: A shared repository convention reduces bikeshedding across teams and shortens onboarding for new hires — but only if the team agrees to the pattern. Quantify the cost of the boilerplate it saves versus the indirection it adds.
  • Use cases where it pays off: Multi-source or evolving schemas, aggregate roots with nontrivial query composition, features where you want to unit-test service logic without a database, and teams already committed to repository/DDD-lite layering.
  • Use cases where it doesn't: Small CRUD apps, teams happy with Eloquent's active record model, or codebases where an extra layer would be ceremony with no testability gain.

When to Consider This Package

Adopt when:

  • You are on, or actively moving to, Laravel 11/12 and need the support matrix to line up with your upgrade timeline.
  • You already believe in a repository layer and want a maintained, minimal implementation rather than writing your own.
  • You need interface-based data access for unit testing service/domain logic without hitting a database.
  • You want a low-ceremony, low-opinion package — this is not a heavyweight DDD framework and shouldn't be sold as one.

Look elsewhere / hold when:

  • You are still on Laravel 10 or earlier — v3.0 will likely not install; stay on 2.7.x or budget the framework upgrade first. Verify constraints before assuming.
  • You need advanced query caching, criteria/pipeline filtering, or Eloquent-level features (scopes, eager loading ergonomics) that a thin wrapper will get in the way of.
  • Your team doesn't actually want the repository pattern — mandating an abstraction layer without buy-in tends to produce pass-through methods that add indirection and zero value.
  • You require strong maintenance signals (regular releases, security responsiveness, broad contributor base). The evidence here is a single compatibility PR from an automated contributor; validate release cadence and issue responsiveness before making it a platform dependency.

Migration note (PM action): Plan v3.0 as a paired upgrade with Laravel 12. Sequence: audit composer.json constraints → confirm PHP version floor → run test suite against the new binding → verify no custom repository subclasses relied on removed/changed base methods. Since this is a major bump, budget for a changelog review of 2.7 → 3.0 rather than assuming compatibility.

How to Pitch It (Stakeholders)

For executives (one paragraph): We're evaluating a small open-source Laravel add-on that lets our application talk to the database through a clean interface instead of hard-wiring database code everywhere. The v3.0 release's only substantive change is support for Laravel 12 — the current framework release — so adopting it either requires us to already be on Laravel 12, or makes it a natural companion to that upgrade. The value is engineering leverage: easier testing and lower cost when data requirements change. The cost is minimal (small dependency, small learning curve), but it's an internal-architecture choice, not a customer-facing feature, and it carries open-source maintenance risk given the project's low release cadence. Recommendation: no urgent spend; evaluate it as part of the next Laravel upgrade cycle.

For engineering (summary): recca0120/laravel-repository provides repository interfaces and a base implementation over Eloquent. v2.7.0 → v3.0 is a major bump whose only documented change is Laravel 12 compatibility (PR #13, via laravel-shift), which means the 3.x line almost certainly drops support for older Laravel versions — check the composer constraints before you touch composer.json. Two things to decide: (1) do we want a repository layer at all, given this package is thin and you could own the equivalent in-house; (2) do we accept the maintenance profile — one automated compatibility PR and no other visible activity in this release. If we adopt, do it alongside the Laravel 12 upgrade and run the service-layer unit tests against the new container bindings to catch any base-class signature changes.

Caveat to state openly: This assessment is based on the v3.0 release notes only — there is no prior assessment and no README, test coverage, or issue-tracker review behind it. Treat the "dropped older Laravel support" inference as a hypothesis to verify, and revisit if usage or dependency-audit data changes.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route