2.0.0
php artisan vendor:publish --force --provider="OpenSoutheners\LaravelApiable\ServiceProvider"
Removed
JsonApiResponse::list
andJsonApiResponse::getOne
methods as isn't the responsibility of this package to act as query repository so it makes easier to encapsulate it into repository or whatever design pattern you're using. UseJsonApiResponse::using
instead sending the query as its parameter.
Added
- PHP 8 attributes for QueryParams:
OpenSoutheners\LaravelApiable\Attributes\FilterQueryParam
OpenSoutheners\LaravelApiable\Attributes\IncludeQueryParam
OpenSoutheners\LaravelApiable\Attributes\AppendsQueryParam
OpenSoutheners\LaravelApiable\Attributes\FieldsQueryParam
OpenSoutheners\LaravelApiable\Attributes\SortQueryParam
OpenSoutheners\LaravelApiable\Attributes\SearchQueryParam
- Method
JsonApiResponse::from
can now be non-statically called asJsonApiResponse::using
(for dependency injection usage in controllers, etc)
Changed
- Config file changes. Please make sure to run
php artisan vendor:publish --force --provider="OpenSoutheners\LaravelApiable\ServiceProvider"
- Constructor from
JsonApiResponse
now only accepts 1 optional parameter (being the query parameter removed in favor of manually setting this by callingJsonApiResponse::using
method) - Constructor from
RequestQueryObject
now only accepts 1 optional parameter (being the query parameter removed in favor of manually setting this by callingRequestQueryObject::setQuery
method)