-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
525 changed files
with
7,570 additions
and
6,278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
example/laravel/.env.example → example/laravel-5.2/.env.example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Bugsnag Laravel 5.2 demo | ||
|
||
This Laravel application demonstrates how to use Bugsnag with version 5.2 of the Laravel web framework for PHP. | ||
|
||
## Setup | ||
|
||
Try this out with [your own Bugsnag account](https://app.bugsnag.com/user/new), and you'll be able to see how the errors are reported directly in the dashboard. | ||
|
||
To get set up, follow the instructions below. Don't forget to replace the placeholder API token with your own! | ||
|
||
|
||
1. Clone the repo and `cd` into this directory: | ||
```shell | ||
git clone https://github.com/bugsnag/bugsnag-laravel.git | ||
cd bugsnag-laravel/example/laravel-5.2 | ||
``` | ||
|
||
1. Install dependencies | ||
```shell | ||
composer install | ||
``` | ||
|
||
1. Copy the `.env.example` file to `.env` | ||
```shell | ||
cp .env.example .env | ||
``` | ||
|
||
1. Set the `BUGSNAG_API_KEY` in `.env` to your Bugsnag project's API Key | ||
1. Generate Laravel's application key | ||
```shell | ||
php artisan key:generate | ||
``` | ||
|
||
1. Run the application. | ||
```shell | ||
php artisan serve | ||
``` | ||
|
||
1. View the example page which will, by default, be served at: http://localhost:8000 | ||
|
||
For more information, see [our Laravel documentation](https://docs.bugsnag.com/platforms/php/laravel/). |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?php | ||
|
||
use Bugsnag\Report; | ||
use Bugsnag\BugsnagLaravel\Facades\Bugsnag; | ||
use Illuminate\Support\Facades\Route; | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Application Routes | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Here is where you can register all of the routes for an application. | ||
| It's a breeze. Simply tell Laravel the URIs it should respond to | ||
| and give it the controller to call when that URI is requested. | ||
| | ||
*/ | ||
|
||
Route::get('/', function () { | ||
return view('welcome'); | ||
}); | ||
|
||
Route::get('crash', function () { | ||
throw new Exception('Crashing exception!'); | ||
}); | ||
|
||
Route::get('notify', function () { | ||
Bugsnag::notifyException(new Exception('A notified exception')); | ||
|
||
return 'An exception has been notified. Check your dashboard to view it!'; | ||
}); | ||
|
||
Route::get('metadata', function () { | ||
Bugsnag::registerCallback(function(Report $report) { | ||
$report->setMetaData([ | ||
'Route Details' => [ | ||
'path' => 'metadata', | ||
'function' => 'Adds a callback to Bugsnag that adds metadata to a notification' | ||
] | ||
]); | ||
}); | ||
|
||
throw new Exception('Metadata exception!'); | ||
}); | ||
|
||
Route::get('notify-with-metadata', function () { | ||
Bugsnag::notifyException( | ||
new Exception('A notified exception with metadata'), | ||
function(Report $report) { | ||
$report->setMetaData([ | ||
'Route Details' => [ | ||
'path' => 'notify-with-metadata', | ||
'function' => 'Shows how to send extra data with a manually notified exception!' | ||
] | ||
]); | ||
} | ||
); | ||
|
||
return 'An exception has been notified. Check your dashboard to view it!'; | ||
}); | ||
|
||
Route::get('severity', function () { | ||
Bugsnag::notifyException( | ||
new Exception('A notified exception with a severity of "info"'), | ||
function(Report $report) { | ||
$report->setSeverity('info'); | ||
} | ||
); | ||
|
||
return 'An exception has been notified. Check your dashboard to view it!'; | ||
}); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
example/laravel57/.gitignore → example/laravel-5.8/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
php: | ||
preset: laravel | ||
disabled: | ||
- unused_use | ||
finder: | ||
not-name: | ||
- index.php | ||
- server.php | ||
js: | ||
finder: | ||
not-name: | ||
- webpack.mix.js | ||
css: true |
Oops, something went wrong.