designcoda / monlogs
Plugin for Monlogs monitoring
2.12
2020-07-25 08:14 UTC
Requires
- php: >=5.3.0
README
Requirements
- PHP >= 7.2
- Laravel >= 5.8
Description
This plugin send errors of your Laravel project to your another site via REST API. Send following info:
'message' - error message (syntax error, unexpected '}', expecting ';'),
'file' - file (absolute path),
'line' - line where error occured,
'trace' - string with trace of an error,
'user_id' - id of authored user (or null),
'url' - URL,
'site' - site domain,
'api_key' - your api key.
Installation
Composer
composer require designcoda/monlogs-laravel
Laravel
- Open config/app.php file and add provider
DesignCoda\Monlogs\MonlogsServiceProvider::class,
- In aliases section of config/app.php add a Facade
'Monlogs' => DesignCoda\Monlogs\MonlogsFacade::class,
-
Get API key for your site
-
Configure .env as needed
MONLOGS_API_KEY= MONLOGS_API_URL=
-
Run for clear caching
php artisan config:clear
php artisan route:clear
Laravel
- Откройте файл config/app.php и добавьте строчку в секции providers
DesignCoda\Monlogs\MonlogsServiceProvider::class,
- В секции aliases того же файла config/app.php добавьте фасад
'Monlogs' => DesignCoda\Monlogs\MonlogsFacade::class,
-
Получите API-ключ для вашего сайта
-
Настройте файл .env (введите свой API-ключ)
MONLOGS_API_KEY= MONLOGS_API_URL=
-
Очистите кэш командами
php artisan config:clear
php artisan route:clear
LICENSE
GNU GPLv3
Copyright Alexanyasha