Download the PHP package jncalderon/laravel-api without Composer
On this page you can find all versions of the php package jncalderon/laravel-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download jncalderon/laravel-api
More information about jncalderon/laravel-api
Files in jncalderon/laravel-api
Download jncalderon/laravel-api
More information about jncalderon/laravel-api
Files in jncalderon/laravel-api
Please rate this library. Is it a good library?
Informations about the package laravel-api
Laravel API
This package help me to some repetitive things in my backend projects.
Packages required
- Laravel fractal (Required)
- Laravel Debugbar (Optional)
- Sentry SDK Laravel (Optional)
Installation
Usage
Json response
Facades
Facade | Description |
---|---|
Api::jsonResponse() | Transform any data to a json Response |
Transformer::serialize() | Serialize data to a camelcase array |
Transformer::camecaseArray() | Camel case all keys in an array |
Transformer::snakecaseArray() | Snake case all keys in an array |
Helpers
Can access to the facades through below helpers
Error handler
Handler no exceptions to Json, change the extends of the file app\Exceptions\Handler.php
to:
Middlewares
In app\Http\Kernel.php
can add below middlewares.
Middleware | Description |
---|---|
JsonDebugbar | Attanch to the JsonResponse the debugbar response |
ConvertRequestFieldsToCamelCase | All keys of paramaters send force to snake case |
Localization | Change language adding the header X-Localization |
SentryUser | Tracking of the user in Sentry |
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
MIT
All versions of laravel-api with dependencies
PHP Build Version
Package Version
No informations.
The package jncalderon/laravel-api contains the following files
Loading the files please wait ....