Skip to content

Sort fields and default include paths

Pre-release
Pre-release
Compare
Choose a tag to compare
@lindyhopchris lindyhopchris released this 26 Apr 13:44
· 198 commits to main since this release

Added

  • #14 Additional sort parameters can now be added to Eloquent schemas. Previously only sortable attributes were supported. These new classes are added to schemas in the sortables() method. Refer to the new Sorting chapter in the documentation.
  • Eloquent schemas now support a default sort order via the $defaultSort property.
  • New generator command jsonapi:sort-field to create a custom sort field class.
  • #74 Developers can now add default include paths to the query request classes (e.g. PostQuery and PostCollectionQuery) via the $defaultIncludePaths property. These include paths are used if the client does not provide any include paths.