PHP code example of soltancode / return-response
1. Go to this page and download the library: Download soltancode/return-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/ */
soltancode / return-response example snippets
use Soltancode\ReturnResponse\Facades\ReturnResponse;
// $httpResponse = 200;
// $data = ['success' => true];
// $message = "Operation done successfully.";
# Using as class:
return ReturnResponse::response($httpResponse, $data, $message);
# Using as helper:
return returnResponse()->response($httpResponse, $data, $message);