designcoda/monlogs

Plugin for Monlogs monitoring

2.12 2020-07-25 08:14 UTC

This package is auto-updated.

Last update: 2024-05-25 16:50:40 UTC


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

  1. Open config/app.php file and add provider
DesignCoda\Monlogs\MonlogsServiceProvider::class,
  1. In aliases section of config/app.php add a Facade
'Monlogs' => DesignCoda\Monlogs\MonlogsFacade::class,
  1. Get API key for your site

  2. Configure .env as needed

     MONLOGS_API_KEY=
     MONLOGS_API_URL=
    
  3. Run for clear caching

php artisan config:clear
php artisan route:clear

Laravel

  1. Откройте файл config/app.php и добавьте строчку в секции providers
DesignCoda\Monlogs\MonlogsServiceProvider::class,
  1. В секции aliases того же файла config/app.php добавьте фасад
'Monlogs' => DesignCoda\Monlogs\MonlogsFacade::class,
  1. Получите API-ключ для вашего сайта

  2. Настройте файл .env (введите свой API-ключ)

     MONLOGS_API_KEY=
     MONLOGS_API_URL=
    
  3. Очистите кэш командами

php artisan config:clear
php artisan route:clear

LICENSE

GNU GPLv3
Copyright Alexanyasha