PHP code example of twineis / raven-php

1. Go to this page and download the library: Download twineis/raven-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

twineis / raven-php example snippets


Twine\Raven\Providers\LaravelServiceProvider::class,

'Raven' => Twine\Raven\Facades\Raven::class,

$app->register(Twine\Raven\Providers\LumenServiceProvider::class);

RAVEN_DSN=your-raven-dsn

RAVEN_QUEUE_CONNECTION=redis
RAVEN_QUEUE_NAME=error

Log::error($exception);

// or

app('log')->error($exception);
	
RAVEN_LEVEL=error

Raven::getLastEventId();

Log::error('Oops, Something went wrong', [
    'user' => ['name' => $user->name, 'email' => $user->email]
]);
bash
$ composer 
bash
$ php artisan vendor:publish