PHP code example of wyox / laravel-gitlab-reporter

1. Go to this page and download the library: Download wyox/laravel-gitlab-reporter 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/ */

    

wyox / laravel-gitlab-reporter example snippets

 
    ->withExceptions(function (Exceptions $exceptions) {
        // ADD below
        $exceptions->report(function(\Throwable $e){
            if (app()->bound('gitlab.report')) {
                app('gitlab.report')->report($e);
            }
        });
        // ADD Above
    })

public function register()
{
    $this->reportable(function (Throwable $e) {
        if (app()->bound('gitlab.report') && $this->shouldReport($e)) {
            app('gitlab.report')->report($e);
        }
    });
}
bash
php artisan vendor:publish --tag=gitlab-report