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.
Installs: 11 754
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: ^8.0
- api-ecosystem-for-laravel/dingo-api: ^4.1
- illuminate/support: ^9.0|^10.0
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' '~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.
This repo is inspired by the gem "olive_branch"