Laravel API Response is a good package that we can use to create API responses easily.

laravel api responses

Demo

laravel api responses

Installation

Install package through composer:

 $ composer require obiefy/api-response

publish config file:

 php artisan vendor:publish --tag=api-response

Source Code

https://github.com/obiefy/api-response?utm_source=learninglaravel