PHP code example of usmanzahid / service-response

1. Go to this page and download the library: Download usmanzahid/service-response 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/ */

    

usmanzahid / service-response example snippets


return json_encode($response);

// You can also do:
$response->jsonSerialize

return response()->json($response);