phuongdanh / simple-response
This package is used to wrap your response data. It supports for laravel as well
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/phuongdanh/simple-response
Requires
This package is auto-updated.
Last update: 2025-10-10 14:47:04 UTC
README
Simple package to handle response properly in your API. This package does not include any dependency.
Install
Via Composer
$ composer require phuongdanh/simple-response
Requirements
The following versions of PHP are supported by this version.
- PHP 5.6
- PHP 7.0
- PHP 7.1
- PHP 7.2
- PHP 8.x
How to use it?
// Use namespace use SimpleResponse\Response; // response with default data type based on Accept value in request's header return Response::default($your_data); // response as application/json return Response::json($your_data); // response as text/xml return Response::xml($your_data);
License
The MIT License (MIT). Please see License File for more information.