dennissmink / lara-bug
Laravel 6.x/7.x/8.x/9.x bug notifier
Fund package maintenance!
cannonb4ll
Installs: 164
Dependents: 0
Suggesters: 0
Security: 0
Stars: 269
Watchers: 11
Forks: 59
Open Issues: 9
Requires
- php: ^7.4 || ^8.0
- guzzlehttp/guzzle: ^6.0.2 || ^7.0
- illuminate/support: ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0
- nesbot/carbon: ^2.62.1 || ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.4
- mockery/mockery: ^1.3.3 || ^1.4.2
- orchestra/testbench: ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0
- phpunit/phpunit: ^8.5.23 || ^9.5.12 || ^10.0.9
- dev-master
- 3.1
- 3.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4
- 2.3.1
- 2.3
- 2.2
- 2.1.2
- 2.1.1
- 2.1
- 2.0.1
- 2.0
- 1.4.2
- 1.4.1
- 1.4
- 1.3.1
- 1.3
- 1.2.2
- 1.2.1
- 1.2
- 1.1
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0
- dev-feature/add-custom-exception-to-test-command
- dev-feature/project-version
- dev-feature/improvements-to-test-command
- dev-feature/add-environment-to-exception
This package is auto-updated.
Last update: 2024-06-16 12:04:09 UTC
README
LaraBug
Laravel 6.x/7.x/8.x/9.x/10.x/11.x package for logging errors to larabug.com
Installation on laravel
You can install the package through Composer.
composer require larabug/larabug
Then publish the config and migration file of the package using the vendor publish command.
php artisan vendor:publish --provider="LaraBug\ServiceProvider"
And adjust config file (config/larabug.php
) with your desired settings.
Note: by default only production environments will report errors. To modify this edit your LaraBug configuration.
Installation on lumen
You can install the package through Composer.
composer require larabug/larabug
Copy the config file (larabug.php
) to lumen config directory.
php -r "file_exists('config/') || mkdir('config/'); copy('vendor/larabug/larabug/config/larabug.php', 'config/larabug.php');"
And adjust config file (config/larabug.php
) with your desired settings.
In bootstrap/app.php
you will need to:
- Uncomment this line:
$app->withFacades();
- Register the larabug config file:
$app->configure('larabug');
- Register larabug service provider:
$app->register(LaraBug\ServiceProvider::class);
Configuration variables
All that is left to do is to define two env configuration variables.
LB_KEY=
LB_PROJECT_KEY=
LB_KEY
is your profile key which authorises your account to the API.
LB_PROJECT_KEY
is your project API key which you've received when creating a project.
Get the variables at larabug.com
Reporting unhandled exceptions
You can use LaraBug as a log-channel by adding the following config to the channels
section in config/logging.php
:
'channels' => [ // ... 'larabug' => [ 'driver' => 'larabug', ], ],
After that you can add it to the stack section:
'channels' => [ 'stack' => [ 'driver' => 'stack', 'channels' => ['single', 'larabug'], ], //... ],
PS: If you're using lumen, it could be that you don't have the logging.php
file. So, you can use default logging file from
framework core and make changes above.
php -r "file_exists('config/') || mkdir('config/'); copy('vendor/laravel/lumen-framework/config/logging.php', 'config/logging.php');"
License
The LaraBug package is open source software licensed under the license MIT