PHPackages                             larvabug/larvabug-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. larvabug/larvabug-laravel

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

larvabug/larvabug-laravel
=========================

Larvabug monitoring

v1.0.1(5y ago)81532MITPHPPHP &gt;=7.1

Since Jul 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/larvabug/larvabug-laravel)[ Packagist](https://packagist.org/packages/larvabug/larvabug-laravel)[ RSS](/packages/larvabug-larvabug-laravel/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

 [![](https://camo.githubusercontent.com/e2d4c8d821ed5ae77b44efeae1a7a7a758a5bb993b776e97a2d442751d3dee88/687474703a2f2f6465762e6c617276616275672e636f6d2f6173736574732f696d616765732f6c617276616275672d6c6f676f2e706e67)](https://camo.githubusercontent.com/e2d4c8d821ed5ae77b44efeae1a7a7a758a5bb993b776e97a2d442751d3dee88/687474703a2f2f6465762e6c617276616275672e636f6d2f6173736574732f696d616765732f6c617276616275672d6c6f676f2e706e67)

LarvaBug
========

[](#larvabug)

Laravel 5.2+ package for logging errors to [larvabug.com](https://www.larvabug.com)

[![Software License](https://camo.githubusercontent.com/f26a9f9c3ecc617a9ea1264671e606452f42365de74b386e9b1e1af04720ae05/68747470733a2f2f706f7365722e707567782e6f72672f6c617276616275672f6c617276616275672d6c61726176656c2f6c6963656e73652e737667)](LICENSE.md)[![Latest Version on Packagist](https://camo.githubusercontent.com/695a8942ce862956a8f8c184d35ad2495c6fe4b583bfd8e34d8994da1a94069b/68747470733a2f2f706f7365722e707567782e6f72672f6c617276616275672f6c617276616275672d6c61726176656c2f762f737461626c652e737667)](https://packagist.org/packages/larvabug/larvabug-laravel)[![Total Downloads](https://camo.githubusercontent.com/7f4d8c992c33103e94604cf6b7d59beee3e94e714ed8a1da36026a1709e8f201/68747470733a2f2f706f7365722e707567782e6f72672f6c617276616275672f6c617276616275672d6c61726176656c2f642f746f74616c2e737667)](https://packagist.org/packages/larvabug/larvabug-laravel)

Installation
------------

[](#installation)

You can install the package through Composer.

```
composer require larvabug/larvabug-laravel
```

Add the LarvaBug service provider and facade in config/app.php:

```
'providers' => [
    LarvaBug\Provider\ServiceProvider::class,
],

'aliases' => [
    'LarvaBug' => \LarvaBug\Facade\LarvaBug::class
],
```

Then publish the config file of the larvabug using artisan command.

```
php artisan vendor:publish --provider="LarvaBug\Provider\ServiceProvider"
```

File (`config/larvabug.php`) contains all the configuration related to bug reporting.

Note: by default production and local environments will report errors. To modify this edit your larvabug configuration environment array.

Environment variables
---------------------

[](#environment-variables)

Need to define two environment variable and their values.

```
LB_PROJECT_ID=
LB_SECRET=

```

Get these variable values under setting page of the project at [larvabug.com](https://www.larvabug.com)

Reporting unhandled exceptions
==============================

[](#reporting-unhandled-exceptions)

Add larvabug reporting to `app/Exceptions/Handler.php` file of laravel.

```
public function report(Exception $exception)
{
    LarvaBug::report($exception);
    parent::report($exception);
}
```

Reporting handled exceptions
============================

[](#reporting-handled-exceptions)

In case of handled exceptions, exceptions can be reported to larvabug by using `LarvaBug` facade:

```
try {
    //Code here
 }catch (\Exception $exception){
    LarvaBug::report($exception);
}
```

\#Logging specific data

To log specific data to LarvaBug use `log()` method of LarvaBug facade:

```
$metaData = ['custom_data' => ['x','y','z']]; //Array
LarvaBug::log('Log message here',$metaData);
```

User feedback
=============

[](#user-feedback)

LarvaBug provides the ability to collect feedback from user when an error occurs, LarvaBug shows feedback collection page and then feedback is added with the exception report, to enable this functionality simply need to add `collectFeedback()` method in `render()` method of `app/Exceptions/Handler.php`

```
public function render($request, Exception $exception)
{
    if (LarvaBug::shouldCollectFeedback($exception) && !$request->wantsJson()) {
        return LarvaBug::collectFeedback();
    }
    return parent::render($request, $exception);
}
```

License
-------

[](#license)

The larvabug package is open source software licensed under the [license MIT](http://opensource.org/licenses/MIT)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

2132d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/67326217?v=4)[larvabug](/maintainers/larvabug)[@larvabug](https://github.com/larvabug)

---

Top Contributors

[![sfkazmi](https://avatars.githubusercontent.com/u/25618543?v=4)](https://github.com/sfkazmi "sfkazmi (9 commits)")[![larvabug](https://avatars.githubusercontent.com/u/67326217?v=4)](https://github.com/larvabug "larvabug (3 commits)")

---

Tags

bugbug-trackerexception-handlingexception-reportingexception-trackerexceptionslaravel-5-packagelaravel-packagemonitoring

### Embed Badge

![Health badge](/badges/larvabug-larvabug-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/larvabug-larvabug-laravel/health.svg)](https://phpackages.com/packages/larvabug-larvabug-laravel)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[beyondcode/laravel-server-timing

Add Server-Timing header information from within your Laravel apps.

5712.0M1](/packages/beyondcode-laravel-server-timing)[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.4M7](/packages/rollbar-rollbar-laravel)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)[label84/laravel-auth-log

Log user authentication actions in Laravel.

3654.0k](/packages/label84-laravel-auth-log)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
