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

crcms/repository

crcms/repository is a Laravel repository-pattern package that separates data access from business logic, with support for Eloquent models, reusable criteria, caching, and fluent query methods to keep controllers and services clean and testable.

View on GitHub
Deep Wiki
Context7

Detached model and controller warehouse data provider

Frequently asked questions about Repository
What is crcms/repository used for in Laravel?
crcms/repository is a Laravel repository-pattern package that puts a provider layer between controllers and Eloquent models. It is intended for reusable data-access logic, criteria, caching, and fluent query methods so controllers and services stay cleaner and easier to test. The warehouse data provider wording describes a repository-style data provider, not an analytics or warehouse connector. It is best for apps that already want this abstraction, not tiny CRUD services.
How do I install and configure crcms/repository in a Laravel application?
Install it with Composer and register the package service provider in your Laravel app, then define repository contracts and bind implementations in a service provider. The main setup work is mapping existing model queries into repository methods and keeping controllers from bypassing the repository layer. Check the package README and composer.json for exact provider names and configuration because conventions may be undocumented. Start with one domain before rolling it out widely.
Which Laravel and PHP versions are supported by crcms/repository?
The provided context does not list exact Laravel and PHP version constraints, so check the package composer.json and release history before committing. Validate compatibility against your current Laravel baseline, PHP version, database driver, pagination, authorization, and testing setup. Pin the version and add contract tests around repository behavior. Because community signal is thin, treat version support as something to verify rather than assume.
Does crcms/repository work with Eloquent models and existing queries?
Yes, the package is built around Eloquent models and repository providers, so it can wrap existing Eloquent query behavior behind interfaces. The practical approach is to move query logic into repository methods incrementally and keep existing Eloquent code working behind adapters during migration. Be careful not to let Eloquent-specific details leak through repository interfaces if you want testability and swappable implementations. It is not a replacement for Eloquent or a full domain-modeling framework.
How do criteria and fluent query methods work in crcms/repository?
Criteria are reusable query conditions, and fluent query methods let repository calls read like chainable filters rather than raw model queries. They help centralize common filtering, sorting, and query constraints so controllers do not repeat Eloquent logic. Design criteria carefully and avoid shared mutable criteria state between calls. Keep complex SQL and performance-sensitive joins visible enough that the abstraction does not hide N+1 queries.
Does crcms/repository support caching?
The package overview mentions caching support, so repositories can centralize cache reads and writes around data-access methods. You still need a clear cache invalidation strategy tied to writes, transactions, and model events. Avoid caching large or user-specific result sets without keys and TTLs. Test cache behavior alongside query behavior because stale repository caches are a common production risk.
Does crcms/repository support transactions, eager loading, and pagination?
Transactions, eager loading, and pagination are Eloquent-level concerns, and the package can support them only if your repository methods expose them cleanly. Do not assume the abstraction handles transaction boundaries or eager loading automatically; design those in repository contracts and test them. Pagination should return a consistent paginator shape, and eager loading should be explicit where N+1 risk exists. If the package hides these details, keep a fallback path to plain Eloquent for complex queries.
How do I test repositories built with crcms/repository?
Test repositories with contract tests that assert query behavior, filtering, caching, transactions, and pagination rather than testing the package internals. Use a real test database or Laravel's database testing helpers so Eloquent behavior is exercised. Mock repository interfaces in controller and service tests to keep those tests fast. Add integration tests around the service-provider bindings because binding misconfiguration is a common failure mode.
Is crcms/repository actively maintained and safe for production?
It is MIT-licensed, which is favorable, but the community signal is thin at 66 stars and the maintenance cadence is unknown. For production, assume some ownership: document conventions, pin versions, add contract tests, and establish an internal owner. Support is likely GitHub-issue-based with limited SLAs, so plan a fork or vendor strategy if critical fixes are needed. Treat it as a tactical abstraction until your pilot proves it reduces coupling or improves testability.
What are alternatives to crcms/repository for the Laravel repository pattern?
Alternatives include plain Eloquent with query scopes, custom repository interfaces implemented in your app, or larger Laravel repository packages with stronger maintenance signals. The safest alternative is often an internal repository layer tailored to your domain, because it avoids upstream abandonment risk and keeps Eloquent behavior visible. Compare alternatives on Laravel version support, test coverage, caching and criteria features, and upgrade path. For small CRUD apps, plain Eloquent is usually simpler than adding a repository package.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections