PHP code example of understand / understand-laravel
1. Go to this page and download the library: Download understand/understand-laravel 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/ */
# Specify which handler to use - sync, queue or async.
#
# Note that the async handler will only work in systems where
# the CURL command line tool is installed
UNDERSTAND_HANDLER=async
public function report(Exception $e)
{
\UnderstandExceptionLogger::log($e);
return parent::report($e);
}
// app/Logging/UnderstandLogFilter.php
declare(strict_types=1);
namespace App\Logging;
use Illuminate\Support\Str;
class UnderstandLogFilter
{
public function __invoke($level, $message, $context): bool
{
if ($level === 'warning' && Str::contains(strtolower($message), 'deprecated')) {
return true;
}
return false;
}
}