Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Commit 64cc9eb

Browse files
author
Robert Kummer
committed
Add automatic package discovery
1 parent 0e60eb8 commit 64cc9eb

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,18 @@ JSON Api Package for Laravel
88
## Installation
99

1010
```shell
11-
composer require ipunkt/laravel-json-api:dev-master
11+
composer require ipunkt/laravel-json-api
1212
```
1313

14+
The package supports the package auto-discovery feature since laravel 5.5. For older laravel versions follow the instructions:
15+
1416
Add service provider to `config/app.php`:
1517
```php
1618
'providers' => [
1719
\Ipunkt\LaravelJsonApi\LaravelJsonApiServiceProvider::class,
1820
]
1921
```
2022

21-
Publish Configuration (optional step, but suggested):
22-
```shell
23-
php artisan vendor:publish --provider="Ipunkt\LaravelJsonApi\LaravelJsonApiServiceProvider"
24-
```
25-
26-
### Facades
27-
2823
Add the following Facades to your `config/app.php` file:
2924

3025
```php
@@ -76,6 +71,11 @@ By default the package configures all routes itself. This is the suggested optio
7671

7772
You can configure the json api responses as well. There are optional response elements in the json api 1.0 standard. By default we return them all, but you can turn them off if you want to save response bytes.
7873

74+
Publish Configuration (optional step, but suggested):
75+
```shell
76+
php artisan vendor:publish --provider="Ipunkt\LaravelJsonApi\LaravelJsonApiServiceProvider"
77+
```
78+
7979
### defaults section
8080

8181
#### max-limits

composer.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,16 @@
3131
],
3232
"require-dev": {
3333
"phpunit/phpunit": "^5.0"
34-
}
34+
},
35+
"extra": {
36+
"laravel": {
37+
"providers": [
38+
"Ipunkt\\LaravelJsonApi\\LaravelJsonApiServiceProvider"
39+
],
40+
"aliases": {
41+
"RelationshipFilterParser": "Ipunkt\\LaravelJsonApi\\Services\\RelationshipFilterParser\\RelationshipFilterParserFacade",
42+
"FilterApplier": "Ipunkt\\LaravelJsonApi\\Services\\FilterApplier\\FilterApplierFacade"
43+
}
44+
}
45+
}
3546
}

0 commit comments

Comments
 (0)