Download the PHP package api-skeletons/laravel-hal without Composer
On this page you can find all versions of the php package api-skeletons/laravel-hal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download api-skeletons/laravel-hal
More information about api-skeletons/laravel-hal
Files in api-skeletons/laravel-hal
Package laravel-hal
Short Description Hypertext Application Language for Laravel
License MIT
Informations about the package laravel-hal
Hypertext Application Language for Laravel
HAL - Hypertext Application Language is a JSON dialect which gives a consistent and easy way to add HATEOAS - Hypertext As The Engine Of Application State - to your API. This library makes composing HAL responses easy including embedded data.
This library consists of a Hydrator Manager and you will write hydrators for the classes you want to serve as HAL. Central to this library is a Resource object on which HAL resources are attached.
Although this library is for Laravel, it is not specific to Eloquent. This same library can be used with any datasource to compose a HAL response.
This is a direct implementation of https://tools.ietf.org/html/draft-kelly-json-hal-08
Read The Documentation
Quick Look
Quick Start
- Create a hydrator manager
- Create a hydrator for the User class
- Create a hydrator for the Role class
- Compose these into a HAL resource and return HAL from a controller action
Create a hydrator manager
Create a hydrator for the User class
Create a hydrator for the Role class
Compose these into a HAL resource and return HAL from a controller action
HAL Response
All versions of laravel-hal with dependencies
laravel/framework Version ^8.0 || ^9.0
nesbot/carbon Version ^2.30
kylekatarnls/update-helper Version ^1.2.1