Skip to content

Provides data repository patterns with criteria-based query filtering for eloquent model manipulation in Laravel.

License

Notifications You must be signed in to change notification settings

sinemacula/laravel-repositories

Repository files navigation

Laravel Repositories

Latest Stable Version Build Status StyleCI Maintainability Test Coverage Total Downloads

This Laravel package offers a streamlined repository pattern implementation with criteria-based query filtering, optimized for elegant and efficient manipulation of Eloquent models. It simplifies the robust capabilities of the original l5-repositories, focusing on the features most essential and frequently used, given that the l5-repositories project is no longer maintained.

A big thanks to the creators of andersao/l5-repository for their pioneering work, which heavily inspired this project. Our package aims to continue in that spirit, tailored for today's Laravel applications.

Features

  • Clean Model Architecture: Implements the data repository pattern to abstract data logic away from the models, ensuring that your models stay clean and focused solely on their intended functionalities.
  • Flexible Data Retrieval: Utilizes a robust system of criteria and scopes that allow for precise and flexible retrieval of data, enabling developers to easily implement complex query logic without cluttering the model layer.
  • Criteria-Based Filtering: Offers the ability to dynamically add, remove, or modify query criteria on-the-fly, providing powerful and reusable components for custom query construction.

Installation

To install the Laravel API Repositories package, run the following command in your project directory:

composer require sinemacula/laravel-repositories

Configuration

After installation, publish the package configuration to customize it according to your needs:

php artisan vendor:publish --provider="SineMacula\Repositories\RepositoryServiceProvider"

This command publishes the package configuration file to your application's config directory.

Usage

Coming soon...

Contributing

Contributions are welcome and will be fully credited. We accept contributions via pull requests on GitHub.

Security

If you discover any security related issues, please email instead of using the issue tracker.

License

The Laravel Repositories repository is open-sourced software licensed under the Apache License, Version 2.0.

About

Provides data repository patterns with criteria-based query filtering for eloquent model manipulation in Laravel.

Resources

License

Stars

Watchers

Forks

Languages