WhoopsReport
A Laravel package to send a report when occurring bug.(for Laravel 4.2), (*1)
, (*2)
Installation
Add this package name in composer.json, (*3)
"require": {
"sukohi/whoops-report": "1.*"
}
Execute composer command., (*4)
composer update
Register the service provider in app.php, (*5)
'providers' => array(
...Others...,
'Sukohi\WhoopsReport\WhoopsReportServiceProvider',
)
Also alias, (*6)
'aliases' => array(
...Others...,
'WhoopsReport' => 'Sukohi\WhoopsReport\Facades\WhoopsReport',
)
Preparation
Set routes in your routes.php, (*7)
(in routes.php), (*8)
Route::post('whoops-report', array('as' => 'whoops-report', function()
{
return WhoopsReport::send('YOUR-MAIL@example.com');
}));
App::error(function(Exception $exception, $code)
{
return WhoopsReport::view($exception);
});
That's all., (*9)
About cc and bcc
You also can set cc and/or bcc email addresses like this., (*10)
return WhoopsReport::send('YOUR-MAIL@example.com', [
'cc' => ['cc1@example.com'],
'bcc' => ['bcc1@example.com'],
]);
Locale
If you'd like to use language except English, you need to set a lang file like this., (*11)
(in case of Japanese), (*12)
app/lang/packages/ja/whoops-report/message.php, (*13)
<?php
return [
'title' => 'ใจใฉใผใ็บ็ใใพใใใ',
'description' => 'ใไธไพฟใใๆใใใพใใฆ็ณใ่จณใใใใพใใใไปฅไธใซไธๅ
ทๅใฎ็ถๆณใใงใใใ ใ่ฉณ็ดฐใซใ่จๅ
ฅใ้ไฟกใใฆใใ ใใใ',
'button' => 'ๅ ฑๅใใ',
'confirm' => 'ใใฐๅ ฑๅใ้ไฟกใใพใใใใใใใงใใ?',
'complete' => 'ใใฐๅ ฑๅใ้ไฟกใใใพใใใใๅๅใใใใจใใใใใพใใใ',
];
Note
I guess that you might need to check authorized in routes.php., (*14)
License
This package is licensed under the MIT License., (*15)
Copyright 2015 Sukohi Kuhoh, (*16)