jenssegers / laravel-rollbar

Rollbar error monitoring integration for Laravel projects
328 stars 98 forks source link

Flush error in Laravel 4 #11

Closed russback closed 9 years ago

russback commented 9 years ago

Call to undefined method Illuminate\Foundation\Application::resolved() in /var/www/booking/vendor/jenssegers/rollbar/src/RollbarServiceProvider.php on line 34

I've not tried Laravel 5 so not sure what the best fix is, but changing the code from this:

    // Flush callback
    $flush = function() use ($app)
    {
        if ($app->resolved('rollbar.client'))
        {
            $app['rollbar.client']->flush();
        }
    };

To this:

    // Flush callback
    $flush = function() use ($app)
    {
        if ($app->app['rollbar.client'])
        {
            $app['rollbar.client']->flush();
        }
    };

Worked for me