Skip to content

Commit 3531952

Browse files
committed
[+] (details) add request and auth user infos
1 parent fa81408 commit 3531952

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ return [
4343
'disabledOn' => [
4444
//
4545
],
46+
47+
'cacheCooldown' => 10, // in minutes
4648
];
4749
```
4850

@@ -56,6 +58,8 @@ customize the following options:
5658
`'subject'`: Define the subject line for error notification emails. You can use placeholders like `env('APP_NAME')` to
5759
dynamically include your application's name.
5860

61+
`'cacheCooldown'`: Set the cooling-off period (in minutes) for error notifications. If the same error occurs several times within this period.
62+
5963
`'disabledOn'`: You can specify a list of environments (based on `APP_ENV`) where the Error Mailer will be disabled.
6064
For example, if you want to disable the mailer in the local environment, add 'local' to the array:
6165

resources/views/error.blade.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,41 @@
1414
## URL :
1515
# {{ url(request()->getPathInfo()) ?? "" }}
1616

17+
@component('mail::table')
18+
| Request : | |
19+
| --- | --- |
20+
| **Method** | {{ request()->method() }} |
21+
| **IP** | {{ request()->ip() }} |
22+
| **User Agent** | {{ request()->userAgent() }} |
23+
| **Referrer** | {{ request()->header('referer') }} |
24+
| **Request Time** | {{ \Carbon\Carbon::createFromTimestamp(request()->server('REQUEST_TIME'))->toDateTimeString() }} |
25+
| **Request URI** | {{ request()->server('REQUEST_URI') }} |
26+
@endcomponent
27+
28+
@if(auth()->check())
29+
@component('mail::table')
30+
| Auth User : | |
31+
| --- | --- |
32+
| **ID** | {{ auth()->id() }} |
33+
| **Name** | {{ auth()->user()->name ?? "" }} |
34+
| **Email** | {{ auth()->user()->email ?? "" }} |
35+
@endcomponent
36+
@else
37+
@component('mail::table')
38+
| Auth User : | |
39+
| --- | --- |
40+
| No Auth User | |
41+
@endcomponent
42+
@endif
43+
1744
## Trace :
45+
@component('mail::panel')
1846
{{ $exception || $stackTrace ? $stackTrace : "" }}
47+
@endcomponent
1948
</x-mail::message>
49+
50+
<style>
51+
thead > tr > th {
52+
text-align: left;
53+
}
54+
</style>

0 commit comments

Comments
 (0)