We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f73ae81 commit c043ffbCopy full SHA for c043ffb
app/Exceptions/Handler.php
@@ -73,4 +73,20 @@ public function render($request, Throwable $exception) {
73
74
return $response;
75
}
76
+
77
+ /**
78
+ * Builds the exception's context array.
79
+ *
80
+ * @return array
81
+ */
82
+ protected function context(): array {
83
+ try {
84
+ return array_merge(parent::context(), [
85
+ 'url' => request()?->fullUrl(),
86
+ ]);
87
+ } catch (Throwable) {
88
+ // If request() is not available (e.g. in Artisan commands), return the default context.
89
+ return parent::context();
90
+ }
91
92
0 commit comments