PHP code example of alireaza / error-handler-render-json-response
1. Go to this page and download the library: Download alireaza/error-handler-render-json-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/ */
alireaza / error-handler-render-json-response example snippets
use AliReaza\ErrorHandler\ErrorHandler;
use AliReaza\ErrorHandler\Render\JsonResponse as RenderErrorHandler;
$error_handler = new ErrorHandler();
$error_handler->register(true, true);
$error_handler->setRender(RenderErrorHandler::class);