PHP code example of decodeblock / api-utility
1. Go to this page and download the library: Download decodeblock/api-utility 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/ */
decodeblock / api-utility example snippets
use Illuminate\Http\Response;
use Decodeblock\ApiUtility\Traits\ApiResponder;
class YourController extends Controller
{
use ApiResponder;
public function index()
{
return $this->successResponse("Hello, API Utility", Response::HTTP_OK, null);
}
}