PHP code example of hesamrad / laravel-api-debugger
1. Go to this page and download the library: Download hesamrad/laravel-api-debugger 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/ */
hesamrad / laravel-api-debugger example snippets
composer
Route::get('users', function () {
return response()->json([
'users' => User::get()
]);
})->middleware('debugger'); // <- I added the middleware to a single route for testing.
// api.php
$string = 'This is awesome!';
jdd($string);
json
{
"dump": [
"This is awesome!"
],
"trace": {
"file": "/var/www/laravel-api-debugger/routes/api.php",
"line": 14
}
}