PHP code example of ivankotut / exception-json-response
1. Go to this page and download the library: Download ivankotut/exception-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/ */
ivankotut / exception-json-response example snippets
json
{
"type":"NotFoundError",
"message":"No route found for \"GET http:\/\/localhost\/api\/test\"",
"trace":[
{
"file":"\/var\/www\/vendor\/symfony\/event-dispatcher\/Debug\/WrappedListener.php",
"line":115,
"function":"onKernelRequest",
"class":"Symfony\\Component\\HttpKernel\\EventListener\\RouterListener",
"type":"->",
"args":[
[],
"kernel.request",
[]
]
},
{"ОСТАЛЬНОЙ ТРЕЙС ОШИБКИ": ""}
]
}