Releases: open-southeners/laravel-apiable
Releases · open-southeners/laravel-apiable
2.3.0
Added
- Conditionally filter out attributes that ends with "_id" (adding config option
responses.include_ids_on_attributes
) JsonApiResponse::includingIdAttributes()
method for settingresponses.include_ids_on_attributes
option value within an individual response
2.2.3
2.2.2
2.2.1
2.2.0
Added
requests.validate_params
config option toapiable.php
for enforcing validation. Requires to publish or manually copy [#7]- Additional filter operators like
gte
(greater or equal than),gt
(greater than),lte
(lower or equal than),lt
(lower than) [#5]
Changed
- Get allowed fields methods from apply query params pipeline classes moved to
OpenSoutheners\LaravelApiable\Http\QueryParamsValidator
- Operators from
allowed_filters
included to meta data are now URL-safe allowed_sorts
structure is now based on['attribute' => 'allowed_direction']
- Allow filters methods/attribute now accepts array with multiple operators
2.1.1
2.1.0
Added
OpenSoutheners\LaravelApiable\Contracts\ViewQueryable
andOpenSoutheners\LaravelApiable\Contracts\ViewableBuilder
classes for models & custom query builders now functional withJsonApiResponse
(can be disabled by config seeconfig/apiable.php
)
2.0.1
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)