From ef52180fc0a8f4970b357954393e97b229883072 Mon Sep 17 00:00:00 2001 From: salehhashemi1992 <81674631+salehhashemi1992@users.noreply.github.com> Date: Sun, 17 Mar 2024 13:09:09 +0330 Subject: [PATCH] update readme file --- README.md | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9c14a29..bb2cb7c 100644 --- a/README.md +++ b/README.md @@ -11,17 +11,20 @@ -This Laravel package abstracts the database layer using repository pattern with enhanced capabilities for filtering and searching. It simplifies the common tasks of data manipulation, along with advanced features for applying custom filters and search criteria. +This Laravel package simplifies and streamlines data access by implementing the repository pattern. +It provides a powerful abstraction layer for your database interactions, +enhanced with flexible filtering, searching, and criteria-based querying. ![Header Image](./assets/header.png) ## Features -* Repository Abstraction -* Dynamic Filtering -* Criteria-Based Filtering -* Search Functionality -* Modular Repository Interface -* Ease of Integration +* **Repository Abstraction:** Decouples data access logic from application code. +* **Dynamic Filtering:** Apply filters to refine database queries. +* **Criteria-Based Filtering:** Define reusable criteria for common query constraints. +* **Search Functionality:** Implement custom search logic based on user input. +* **Modular Repository Interface:** Enforces consistency and maintainability. +* **Ease of Integration:** Seamlessly integrates with Laravel applications. +* **Development Tools:** Automate repository, interface, and filter creation with the `make:repository` command. ## Installation To install the package, you can run the following command: @@ -29,6 +32,26 @@ To install the package, you can run the following command: composer require salehhashemi/laravel-repository ``` +## Development Tools + +The package includes a helpful command to speed up your development workflow: + +* **`make:repository`** This command automates the creation of the following components for a specified model: + + * Repository Class + * Repository Interface + * Filter Class + +**Usage Example:** + +```bash +php artisan make:repository User +``` +or +```bash +php artisan make:repository App\Models\User +``` + ## Example Usage Practical example of how to use this package to manage and interact with a Post model.