2017 © Pedro Peláez
 

library laravel-camelcase-json

Convert response JSON key to camelCase

image

grohiro/laravel-camelcase-json

Convert response JSON key to camelCase

  • Monday, December 11, 2017
  • by grohiro
  • Repository
  • 2 Watchers
  • 6 Stars
  • 2,532 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 18 % Grown

The README.md

laravel-camelcase-json

Convert response JSON key to camelCase., (*1)

Usage

In controller class, (*2)

return response()->json($model);
// => ['userName' => 'foo', 'userKey' => 'bar', ...]

Requirements

  • Laravel 5+

Install

$ composer require 'grohiro/laravel-camelcase-json' '~1.0'
# Laravel 5.7+
$ composer require 'grohiro/laravel-camelcase-json' '~2.0'

Add the service provider., (*3)

config/app.php, (*4)

'provider' => [
    // default providers
    // ...

    Grohiro\LaravelCamelCaseJson\CamelCaseJsonResponseServiceProvider::class,
],

The Versions

11/12 2017

dev-master

9999999-dev

Convert response JSON key to camelCase

  Sources   Download

MIT

11/12 2017

1.1.0

1.1.0.0

Convert response JSON key to camelCase

  Sources   Download

MIT

06/05 2017

1.0.2

1.0.2.0

Convert response JSON key to camelCase

  Sources   Download

MIT

20/04 2017

1.0.1

1.0.1.0

Convert response JSON key to camelCase

  Sources   Download

MIT