Problem Alert is laravel library for handling error and saving this to database.
- Laravel 6++
You can install this library using composer
composer require bangunsoft/problem-alert
php artisan vendor:publish --tag=problem-config
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
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',
];
- Login to your website
- Open
{APP_URL}/vendor/problems
in your browser.
- Catch errors (Done)
- Catch http request if not 2xx (Done)
- MVC (Done)
- I haven't idea
Open terminal and run
./vendor/bin/phpunit ./vendor/bangunsoft/problem-alert/tests/TestCase.php
If you want join to collaborations with me, I'm very happy for that. You can contact me via email Bangunsoft@gmail.com
My English is bad, so sorry for that.