Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/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.
https://github.com/matthv/laravel-dingo-transform
api-transformer dingo-api laravel
Last synced: 16 days ago
JSON representation
This repository lets your API users pass in and receive camelCased or snake_cased keys while your app receives and produces snake_cased ones.
- Host: GitHub
- URL: https://github.com/matthv/laravel-dingo-transform
- Owner: matthv
- License: mit
- Created: 2018-10-29T19:37:18.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-08-24T17:32:17.000Z (over 1 year ago)
- Last Synced: 2024-04-29T21:08:43.679Z (8 months ago)
- Topics: api-transformer, dingo-api, laravel
- Language: PHP
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.MD
- License: LICENSE
Awesome Lists containing this project
README
LARAVEL DINGO TRANSFORM
=============This repository extends the [Dingo API package](https://github.com/dingo/api).
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' '~2.0'
```# Requirements
- Laravel 9/10
- api-ecosystem-for-laravel/dingo-api > 4.1# Use
Include a X-Key-Inflection header with values of camel or snake in your JSON API requests.
![snake_case](https://i.imgur.com/2wn3FAA.png)
![camelCase](https://i.imgur.com/2PC3h8W.png)___
This repo is inspired by the [```gem "olive_branch"```](https://github.com/vigetlabs/olive_branch)
---