PHP code example of alfred-nutile-inc / incomings-client

1. Go to this page and download the library: Download alfred-nutile-inc/incomings-client 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/ */

    

alfred-nutile-inc / incomings-client example snippets


     

     namespace App\Exceptions;

     use Exception;
     use Symfony\Component\HttpKernel\Exception\HttpException;
     use IncomingsExceptionHandler as ExceptionHandler;

     class Handler extends ExceptionHandler
     {


    

    namespace App\Exceptions;

    use Exception;
    use Symfony\Component\HttpKernel\Exception\HttpException;
    use AlfredNutileInc\Incomings\IncomingsExceptionHandler as ExceptionHandler;

    class Handler extends ExceptionHandler
    {

    

    namespace App\Exceptions;

    use Exception;
    use Symfony\Component\HttpKernel\Exception\HttpException;
    use AlfredNutileInc\Incomings\IncomingsExceptionHandlerForLumen as ExceptionHandler;

    class Handler extends ExceptionHandler
    {


Route::get('/example_exception', function() {

    throw new \Exception("Yo Incomings!!!");

});

 namespace App\Exceptions;

use Exception;
use Bugsnag\BugsnagLaravel\BugsnagExceptionHandler as ExceptionHandler;
use AlfredNutileInc\Incomings\IncomingsFacade as Incomings;

class Handler extends ExceptionHandler
{

    protected $dontReport = [
        HttpException::class,
    ];

    public function report(Exception $e)
    {
        $data = [
            'title' => 'Application Exception Error',
            'message' => sprintf(
                "Error Filename %s \n on line %d \n with message %s \n with Code %s",
                $e->getFile(),
                $e->getLine(),
                $e->getMessage(),
                $e->getCode()
            ),
        ];
        Incomings::send($data);

        return parent::report($e);
    }

}