PHP code example of tyasa81 / ezresponse

1. Go to this page and download the library: Download tyasa81/ezresponse library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tyasa81 / ezresponse example snippets


return new SuccessResponse(data: ["test"=>1]);
return new FailResponse(message: "test", data: ["test"=>1]);
return new TooManyRequestResponse();
return new UnauthorizedResponse();