Skip to content

Commit f18521c

Browse files
authored
Update README.md
1 parent 074abcc commit f18521c

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

README.md

+30-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ This Laravel package helps to handle a query request properly
33

44
## Synopsis
55

6-
At the top of the file there should be a short introduction and/ or overview that explains **what** the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)
6+
In order to help
77

88
## Code Example
99

@@ -15,11 +15,37 @@ A short description of the motivation behind the creation and maintenance of the
1515

1616
## Installation
1717

18-
Provide code examples and explanations of how to get the project.
18+
Require this package with composer using the following command:
1919

20-
## API Reference
20+
```bash
21+
composer require luciano-jr/laravel-api-query-handler
22+
```
2123

22-
Depending on the size of the project, if it is small and simple enough the reference docs can be added to the README. For medium size to larger projects it is important to at least provide a link to where the API reference docs live.
24+
After updating composer, add the service provider to the `providers` array in `config/app.php`
25+
26+
```php
27+
Luciano-Jr\LaravelAPIQueryHandler\Services\ServiceProvider::class,
28+
```
29+
30+
### Configuration File
31+
32+
**If you use Lumen please skip this step**
33+
34+
If you want to change the default parameters, run this command on the terminal in order to publish the vendor config file:
35+
36+
`php artisan vendor:publish --provider="Luciano-Jr\LaravelApiQueryHandler\Services\ServiceProvider"`
37+
38+
39+
## Usage
40+
41+
```public function index(Request $request)
42+
{
43+
$collection = $this->repository->all();
44+
45+
$collectionHandler = new CollectionHandler($collection, $request);
46+
$collectionHandler->handle();
47+
}
48+
```
2349

2450
## Tests
2551

0 commit comments

Comments
 (0)