2017 © Pedro Peláez
 

library opbeat-laravel

Laravel integration for Opbeat (https://opbeat.com)

image

saritasa/opbeat-laravel

Laravel integration for Opbeat (https://opbeat.com)

  • Thursday, January 18, 2018
  • by saritasa
  • Repository
  • 7 Watchers
  • 1 Stars
  • 1,260 Installations
  • Shell
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 18 % Grown

The README.md

opbeat-laravel

Laravel integration for opbeat., (*1)

Laravel 5.x

Install the saritasa/opbeat-laravel package:, (*2)

$ composer require saritasa/opbeat-laravel

Add the Opbeat service provider and facade in config/app.php:, (*3)

'providers' => array(
    // ...
    Opbeat\OpbeatLaravel\OpbeatLaravelServiceProvider::class,
)

'aliases' => array(
    // ...
    'Opbeat' => Opbeat\OpbeatLaravel\OpbeatFacade::class,
)

Add Opbeat reporting to App/Exceptions/Handler.php:, (*4)

public function report(Exception $e)
{
    if ($this->shouldReport($e)) {
        app('opbeat')->captureException($e);
    }
    parent::report($e);
}

Create the Opbeat configuration file (config/opbeat.php):, (*5)

$ php artisan vendor:publish --provider="Opbeat\OpbeatLaravel\OpbeatLaravelServiceProvider"

Add your DSN to .env:, (*6)

OPBEAT_APP_ID=bf948ea29c
OPBEAT_ORGANIZATION_ID=4c394af520484784a993cc8977e7c0ce
OPBEAT_ACCESS_TOKEN=3a21ef7091b4082d12b0280f81c7b02c74a657d5

Laravel 4.x

Install the saritasa/opbeat-laravel package:, (*7)

$ composer require saritasa/opbeat-laravel

Add the Opbeat service provider and facade in config/app.php:, (*8)

'providers' => array(
    // ...
    'Opbeat\OpbeatLaravel\OpbeatLaravelServiceProvider',
)

'aliases' => array(
    // ...
    'Opbeat' => 'Opbeat\OpbeatLaravel\OpbeatFacade',
)

Create the Opbeat configuration file (config/opbeat.php):, (*9)

$ php artisan config:publish saritasa/opbeat-laravel

Lumen 5.x

Install the saritasa/opbeat-laravel package:, (*10)

$ composer require saritasa/opbeat-laravel

Register Opbeat in bootstrap/app.php:, (*11)

$app->register('Opbeat\OpbeatLaravel\OpbeatLumenServiceProvider');

# Opbeat must be registered before routes are included
require __DIR__ . '/../app/Http/routes.php';

Add Opbeat reporting to app/Exceptions/Handler.php:, (*12)

public function report(Exception $e)
{
    if ($this->shouldReport($e)) {
        app('opbeat')->captureException($e);
    }
    parent::report($e);
}

Create the Opbeat configuration file (config/opbeat.php):, (*13)

<?php

return [
    /*
    |--------------------------------------------------------------------------
    | Set up exception tracker https://opbeat.com/
    |--------------------------------------------------------------------------
    */

    'app_id' => env('OPBEAT_APP_ID', ''),
    'organization_id' => env('OPBEAT_ORGANIZATION_ID', ''),
    'access_token' => env('OPBEAT_ACCESS_TOKEN', ''),
];

Contributing

First, make sure you can run the test suite. Install development dependencies :, (*14)

$ composer install

You may now use phpunit :, (*15)

$ vendor/bin/phpunit

Resources

The Versions

18/01 2018

dev-master

9999999-dev https://opbeat.com

Laravel integration for Opbeat (https://opbeat.com)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sergey Populov

laravel logging errors opbeat

09/11 2016

0.1.0

0.1.0.0 https://opbeat.com

Laravel integration for Opbeat (https://opbeat.com)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sergey Populov

laravel logging errors opbeat