PHP code example of onexcrm / response-structure
1. Go to this page and download the library: Download onexcrm/response-structure 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/ */
onexcrm / response-structure example snippets
Onex\Responsestructure\OnexResponseStructureServiceProvider::class,
'OnexResponse'=> Onex\Responsestructure\Responsestructure\ResponseStructureClassFacade::class,
/**
* 1st @param array $dataBag
* 2nd @param string $responseMessage (default = '')
* 3rd @param string $bodyMessageTitle (default = '')
* 4th @param string $bodyMessage (default = '')
* 5th @param string $messageType (default = 'success')
* 6th @param string $responseStatus (default = '200')
* 7th @param string $responseType (default = 'success')
* 8th @param string $httpCode (default = '200')
*/
$getResponse = OnexResponse::constructResponse($userData, 'User list found');
dd($getResponse);
$getResponse = OnexResponse::constructResponseJson($userData, 'User list found');
dd($getResponse);
$getResponse = OnexResponse::constructResponseJsonObject($userData, 'User list found');
dd($getResponse);