playkids / api-response
Simple Api Response Library
1.0.2
2022-12-12 16:48 UTC
Requires
- php: >=7.4
- illuminate/http: ^9.43
- symfony/http-foundation: ^6.2
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is not auto-updated.
Last update: 2025-06-11 00:22:03 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 playkids/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');
}
}