PHP code example of themonkeys / error-emailer

1. Go to this page and download the library: Download themonkeys/error-emailer 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/ */

    

themonkeys / error-emailer example snippets


'providers' => array(
    'Themonkeys\ErrorEmailer\ErrorEmailerServiceProvider',
)


return array(
    'enabled' => true,
    'to' => array(
        array('address' => '[email protected]', 'name' => 'Your Name'),
        array('address' => '[email protected]', 'name' => 'My Name'),
    ),
);

    'from' => array('address' => '[email protected]', 'name' => 'My Application'),

App::error(function(Exception $exception, $code)
{
	Log::error($exception);
});

App::pushError(function(Exception $exception, $code)
{
	return View::make('myerrorpage', array(
	    'exception' => $exception,
	    'code' => $code,
    ));
});

'facades' => array(
    'ErrorEmailer' => 'Themonkeys\ErrorEmailer\Facades\ErrorEmailer',
)
sh
php artisan config:publish themonkeys/error-emailer