maycon-oliveira / simple-response
Simple Api Response Library
0.0.1
2022-10-19 15:58 UTC
Requires
- illuminate/http: ^8.83
- phpunit/phpunit: ^9.5
- symfony/http-foundation: ^5.4
This package is auto-updated.
Last update: 2025-07-24 02:59:09 UTC
README
This is a simple project with the proposition to be a lib for apis and easy to develop. Principal use in your Laravel Project
To use in your project:
First needed to install the library, run follow command:
composer require mayconoliveira/simple-response
To use in your Laravel Project, follow steps:
on App\Http\Controllers\Controller
;
Insert in your constructor this code
protected $response;
public function __construct()
{
$this->response = new ApiResponse();
}
After this All Your controllers with extends Controller can access ApiResponse methods
class ExampleController extends Controller
{
public function example()
{
return $this->response->successResponse('data');
}
}