absszero/laravel-stackdriver-error-reporting
| Install | |
|---|---|
composer require absszero/laravel-stackdriver-error-reporting |
|
| Latest Version: | v1.9.6 |
| PHP: | >=5.5 |
| License: | MIT |
| Last Updated: | Jul 28, 2026 |
| Links: | GitHub · Packagist |
Stackdriver Error Reporting for Laravel
Requirements
Laravel 5.1 ~ 12.x
Installation
-
composer require absszero/laravel-stackdriver-error-reporting(For PHP7 and before version. please install
v1.8.0) -
This package provides Package Auto-Discovery.
For Laravel versions before 5.5, you need to add the ServiceProvider in
config/app.php<?php ... 'providers' => [ Absszero\ErrorReportingServiceProvider::class, -
php artisan vendor:publish --provider="Absszero\ErrorReportingServiceProvider"
Configuration
-
Get service account credentials with the role
logging.logWriter(docs) -
Store the key file in your project directory and refer to it in your
.envlike this:GOOGLE_APPLICATION_CREDENTIALS=/My_Authentication.json -
For Laravel 11 and after versions. Edit
bootstrap/app.php.->withExceptions(function (Exceptions $exceptions) { $exceptions->report(function (\Throwable $e) { (new \Absszero\ErrorReporting)->report($e); }); -
For Laravel 10 and before versions. Edit
app/Exceptions/Handler.php.For Laravel 9 and after versions.
<?php public function register() { $this->reportable(function (Throwable $e) { (new \Absszero\ErrorReporting)->report($e); }); }For PHP version before 7, replace
\Throwablewith\Exception.<?php public function report(\Throwable $exception) { parent::report($exception); if ($this->shouldReport($exception)) { (new \Absszero\ErrorReporting)->report($exception); } }
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
Credits
TODO: Write credits
License
This project is licensed under the MIT License - see the LICENSE file for details
Related Packages
This Laravel Eloquent extension provides recursive relationships using common ta...
Compile MJML to responsive HTML emails directly in PHP without requiring Node.js...
laravel 中轻松容易的输出完整的 SQL 语句。 - Easy output of complete SQL statemen...