a custom laravel error logger which saves data into mysql table
composer require winchester/hd-logger
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Add these lines
Service Provider Array:
Winchester\HdLogger\HdLoggerServiceProvider::class
Aliases Array:
'Hdlogger' => Winchester\HdLogger\Facades\HdLoggerFacade::class
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
php artisan migrate
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
use Hdlogger;
public function report(Exception $exception)
{
Hdlogger::insertLogger($exception); // Add this line before parent::report($exception)
parent::report($exception);
}
in your controller class:
use Hdlogger;
public function controllerMethod()
{
Hdlogger::instant('Log this line in database'); // Example of usage
}
Simply append /hd-logger
at end of your base url.
Example: http://localhost:8000/hd-logger