1. Go to this page and download the library: Download cybex/laravel-query-tracer 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/ */
cybex / laravel-query-tracer example snippets
namespace App\Classes;
use Cybex\QueryTracer\Interfaces\ArgumentFormatterInterface;
class CustomArgumentFormatter implements ArgumentFormatterInterface
{
/**
* Formats a single argument according to its type.
*
* @param $argument
* @return string
*/
public function formatArgument($argument): string
{
return gettype($argument);
}
/**
* Formats the individual arguments for display in the call string.
*
* @param array $arguments
* @return string
*/
public function formatStackFrameArguments(array $arguments): string
{
return implode(
', ',
array_map(
function ($argument) {
return $this->formatArgument($argument);
},
$arguments
)
);
}
}