bangunsoft/problem-alert

Captures non-2xx responses and storing them in a database for analysis and monitoring purposes

1.1.1 2023-05-31 13:30 UTC

This package is auto-updated.

Last update: 2024-04-30 00:39:57 UTC


README

Problem Alert is laravel library for handling error and saving this to database.

Laravel Support

  • Laravel 6++

Installing

You can install this library using composer

composer require bangunsoft/problem-alert
php artisan vendor:publish --tag=problem-config

Migrate Database

You must migrate database after install this library

php artisan migrate

Or you can use

php artisan migrate --path=/vendor/bangunsoft/problem-alert/database/migrations/2023_05_30_000001_create_problems_table.php

Configuration

After config published, You can configure the library at config/problem.php

<?php
return [

	//except save request
	'except' =>  [
  	// 'login'
 	],

 	//catch error if listed
 	'status_code' => [
		403,
		404,
		500
	],

	// who can access
	// default is web & auth
 	'middleware' => ['web', 'auth'],

 	//name of the table which visit records should save in
	'table_name' =>  'site_problems',
];

View Access

  • Login to your website
  • Open {APP_URL}/vendor/problems in your browser.

Screenshoot

Sreenshoot

Progress

  • Catch errors (Done)
  • Catch http request if not 2xx (Done)
  • MVC (Done)
  • I haven't idea

Testing

Open terminal and run

./vendor/bin/phpunit ./vendor/bangunsoft/problem-alert/tests/TestCase.php

Contribute

If you want join to collaborations with me, I'm very happy for that. You can contact me via email Bangunsoft@gmail.com

Note

My English is bad, so sorry for that.