sanmark/laravel-standard-json-responses

Library for preparing standardized JSON responses for REST APIs.

Installs: 2 242

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 1

pkg:composer/sanmark/laravel-standard-json-responses

v1.5.0 2021-04-21 01:52 UTC

This package is auto-updated.

Last update: 2025-09-21 11:51:10 UTC


README

Development Guide

1 - Create a Laravel application. We'll refer to this as the "Scaffolding Laravel Application" (SLA).

2 - In SLA's root, create directory packages/sanmark.

3 - Clone this repository into that directory.

4 - To the SLA's composer.json file's autoload.psr-4 section, add the following:

"Sanmark\\LaravelStandardJsonResponses\\": "packages/sanmark/laravel-standard-json-responses/src"

5 - To the SLA's config/app.php file's providers section, add the following:

Sanmark\LaravelStandardJsonResponses\LaravelStandardJsonResponsesServiceProvider::class,

6 - Setup PHP CS Fixer.

  • Install Composer package friendsofphp/php-cs-fixer on SLA.
  • Create a symlink to the .php_cs.dist file in the SLA's root.
  • To run PHP CS Fixer, issue the command ./vendor/bin/php-cs-fixer fix from SLA's root.