Skip to content

Commit c03196f

Browse files
committed
fix route:cache issue
Signed-off-by: Pushpak Chhajed <[email protected]>
1 parent a374d23 commit c03196f

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/BoostServiceProvider.php

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,12 @@ private function registerRoutes(): void
113113
* } $log */
114114
foreach ($logs as $log) {
115115
$logger->write(
116-
level: $this->mapJsTypeToPsr3Level($log['type']),
116+
level: match ($log['type']) {
117+
'warn' => 'warning',
118+
'log', 'table' => 'debug',
119+
'window_error', 'uncaught_error', 'unhandled_rejection' => 'error',
120+
default => $log['type']
121+
},
117122
message: self::buildLogMessageFromData($log['data']),
118123
context: [
119124
'url' => $log['url'],
@@ -168,16 +173,6 @@ private function registerBladeDirectives(BladeCompiler $bladeCompiler): void
168173
$bladeCompiler->directive('boostJs', fn (): string => '<?php echo '.\Laravel\Boost\Services\BrowserLogger::class.'::getScript(); ?>');
169174
}
170175

171-
private function mapJsTypeToPsr3Level(string $type): string
172-
{
173-
return match ($type) {
174-
'warn' => 'warning',
175-
'log', 'table' => 'debug',
176-
'window_error', 'uncaught_error', 'unhandled_rejection' => 'error',
177-
default => $type
178-
};
179-
}
180-
181176
private function hookIntoResponses(Router $router): void
182177
{
183178
$this->app->booted(function () use ($router): void {

0 commit comments

Comments
 (0)