konductors/hal-formatter

This package is abandoned and no longer maintained. No replacement package was suggested.

Small package to format the returned values based on the HAL specifications

v1.0.14 2018-04-03 11:30 UTC

This package is auto-updated.

Last update: 2018-10-03 14:20:17 UTC


README

This package will help you return your API response as specified in the HAL Specification, with simple functionality.

Note: This may not be the perfect solution, but we will have to work on it to enhance it as we work.

Installation

  1. Then add it to your require section either using composer require
composer require "konductors/hal-formatter:~1.0" --prefer-source

or manually by editing your composer.json file like:

    {
        "require":{
            "konductors/hal-formatter":"~1.0"
        }
    }

for sure your require section will have more packages not just this one, so remember to add it.

Usage

You can use the Hal like:

return response()->json(Hal::serviceName('post')->get());

Which will return the minimum response, or if you like to use the hal() helper function which will return the same

return response()->json(hal('post')->get());

Check the docs folder for all the information about how to use it with Laravel Eloquent.

Changelog

Check CHANGELOG for the changelog

Testing

Contributing

Information will follow soon

Security

If you discover any security related issues, please email developer@klassapp.com or use the issue tracker of Bitbuket.

License

The MIT License (MIT). Please see License File for more information.