matthv/laravel-dingo-transform

This repository lets your API users pass in and receive camelCased or snake_cased keys while your app receives and produces snake_cased ones.

v1.3.0 2021-07-27 13:48 UTC

This package is auto-updated.

Last update: 2021-09-27 14:10:59 UTC


README

This repository extends the Dingo API package. It lets your API users pass in and receive camelCased or snake_cased keys while your app receives and produces snake_cased ones.

Installation

composer require 'matthv/laravel-dingo-transform' '~1.2'

Requirements

  • Laravel 7/8
  • Dingo/api 3.+

Use

Include a X-Key-Inflection header with values of camel or snake in your JSON API requests.

snake_case camelCase

This repo is inspired by the gem "olive_branch"