Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 1.77 KB

installation.md

File metadata and controls

60 lines (40 loc) · 1.77 KB

REST API Response Builder for Laravel

Installataion

« Documentation table of contents


Installation

To install ResponseBuilder all you need to do is to open your shell/cmd and do:

composer require marcin-orlowski/laravel-api-response-builder

To install specific version, use

composer require marcin-orlowski/laravel-api-response-builder:<VERSION>

where <VERSION> string consists of MAJOR and MINOR release numbers. For example if you want to use version 6.3, you need to invoke:

composer require marcin-orlowski/laravel-api-response-builder:9.3

which will add the dependency at the release 9.3 + all the bug-fixing releases (9.3.*) but won't automatically pull 9.4 (nor newer) even if available, unless composer.json is updated manually.

If you want to use different configuration than ResponseBuilder defaults, publish and edit configuration file as described in Configuration file documentation.

Setup

ResponseBuilder supports Laravel's auto-discovery feature and it's ready to use once installed.

Configuration file

ResponseBuilder looks for config/response_builder.php configuration file. It's advised to publish default config file to application's config/ directory on installation and then tweak it as needed:

php artisan vendor:publish

Notes

NOTE If you are going to use Exception Handler Helper, you MUST configure it first in your config file (esp. default handler configuration)!