PHPackages                             aelnemr/api-response - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. aelnemr/api-response

ActiveLibary[API Development](/categories/api)

aelnemr/api-response
====================

This package will handle restful api response

v1.2.2(5y ago)65.3k↓50%1MITPHPPHP &gt;=7.1.0

Since Jun 25Pushed 5y ago2 watchersCompare

[ Source](https://github.com/aelnemr/api-response)[ Packagist](https://packagist.org/packages/aelnemr/api-response)[ RSS](/packages/aelnemr-api-response/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)DependenciesVersions (10)Used By (0)

CoreJsonResponse
================

[](#corejsonresponse)

CoreJsonResponse JSON response trait. This trait makes it easy for any controller to return a JSON response with the appropriate HTTP status code.

Install via composer 🔥
======================

[](#install-via-composer-fire)

```
composer require aelnemr/api-response

```

Usage
=====

[](#usage)

All that you need is to `use` the `CoreJsonResponse` trait inside your controller.

**Example:**

```
