Releases: open-southeners/laravel-apiable
Releases · open-southeners/laravel-apiable
3.11.3
Fixed
- Force formatting always coming through even thought is not forced by config
3.11.2
Changed
- Config file now with
response.formatting
withtype
andforce
sub-items as options
Fixed
- Force formatting for Inertia based apps (now can use
Apiable::forceResponseFormatting()
)
3.11.1
Fixed
- Non existing class
ForceAppendAttribute
when reading controller attributes
3.11.0
Added
- Default sorts using
JsonApiResponse::applyDefaultSort
method orOpenSoutheners\LaravelApiable\Attributes\ApplyDefaultSort
attribute - Default filters using
JsonApiResponse::applyDefaultFilter
method orOpenSoutheners\LaravelApiable\Attributes\ApplyDefaultFilter
attribute - Default formatting bypass using
JsonApiResponse::forceFormatting
method
Changed
Request::wantsJsonApi()
only looks atAccept
header, not looking forContent-Type
one anymore- Now all requests can send a different
Accept
header if they want a diffent response formatting. For e.g. sendingAccept: application/json
will get raw JSON response. Default being configured in theconfig/apiable.php
make sure to publish or update it
3.10.0
Added
- Sorts now accepts relationships (for e.g.
/posts?sort=tags.created_at
)
3.9.2
Fixed
- PHP deprecation warning on string vars interpolation
3.9.1
Fixed
JsonApiResponse
using viewable builder (query scopes to filter by view permission) didn't send any user as first parameter
3.9.0
Added
JsonApiResponse::paginateUsing(fn ($query) => $query->simplePaginate())
method to customise pagination used in JSON API responses.
3.8.0
Changed
- Pivot attributes now aren't configurable through
config/apiable.php
, they will always be applied as long as there are any under the relationship. They can be found underrelationships.data.*.meta
and keyed following the same as before:pivot_name_pivot_attribute
(pivot_name
being customisable through: https://laravel.com/docs/10.x/eloquent-relationships#customizing-the-pivot-attribute-name)
3.7.1
Fixed
- Missing import to make work pivot attributes functionality