PHP code example of dasun4u / laravel-ideabiz-handler
1. Go to this page and download the library: Download dasun4u/laravel-ideabiz-handler 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/ */
dasun4u / laravel-ideabiz-handler example snippets
IDEABIZ::generateAccessToken();
IDEABIZ::getAccessToken();
$access_token = IDEABIZ::getAccessToken();
$url = "https://ideabiz.lk/apicall/xyz"
$method = "POST";
$headers = [
"Content-Type" => "application/json",
"Authorization" => "Bearer ".$access_token,
"Accept" => "application/json",
];
$request_body = [
"a" => 123,
"b" => "xyz",
];
// Rest API request and response get to a variable
$response = IDEABIZ::apiCall($url, $method, $headers, $request_body);
// Get response body
$response->getBody();
// Get status code
$response->getStatusCode();
// Get response headers
$response->getHeaders();