diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 93731db4..c6186664 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -45,15 +45,18 @@ class Kernel extends HttpKernel \Illuminate\View\Middleware\ShareErrorsFromSession::class, VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, + \App\Http\Middleware\LogRequestPathMiddleware::class, ], 'api' => [ 'throttle:300,1', \Illuminate\Routing\Middleware\SubstituteBindings::class, + \App\Http\Middleware\LogRequestPathMiddleware::class, ], 'apipub' => [ \Illuminate\Routing\Middleware\SubstituteBindings::class, + \App\Http\Middleware\LogRequestPathMiddleware::class, ], ]; diff --git a/app/Http/Middleware/LogRequestPathMiddleware.php b/app/Http/Middleware/LogRequestPathMiddleware.php new file mode 100644 index 00000000..1933f86b --- /dev/null +++ b/app/Http/Middleware/LogRequestPathMiddleware.php @@ -0,0 +1,32 @@ +method(); + Log::channel('request_path')->info('Request Method: ' . $method); + $fullUrl = $request->fullUrl(); + Log::channel('request_path')->info('Request URL: ' . $fullUrl); + + if ($request->isMethod('post')) { + $payload = $request->all(); + Log::channel('request_path')->info('Request Payload POST: ', $payload); + } + + return $next($request); + } +} diff --git a/config/logging.php b/config/logging.php index 0c9a6ec1..b82c1aa7 100644 --- a/config/logging.php +++ b/config/logging.php @@ -123,6 +123,12 @@ return [ 'path' => storage_path('logs/laravel_perfex_crm.log'), 'level' => 'info', ], + + 'request_path' => [ + 'driver' => 'single', + 'path' => storage_path('logs/laravel_request_path.log'), + 'level' => 'info', + ], //Custom Log Channels - Ends //Custom Log Channels - For Laravel Vapor AWS - Starts diff --git a/package.json b/package.json index eb20f9fc..bc43aab1 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "lodash": "^4.17.13", "resolve-url-loader": "^3.1.5", "vue-loader": "^15.11.1 ", - "vue-template-compiler": "^2.7.16" + "vue-template-compiler": "^2.7.14" }, "paths": { "build": { diff --git a/resources/assets/vue/components/bookings/sections/SupplierPendingOrdersSectionComponent.vue b/resources/assets/vue/components/bookings/sections/SupplierPendingOrdersSectionComponent.vue index 2adb9a43..f171ec83 100644 --- a/resources/assets/vue/components/bookings/sections/SupplierPendingOrdersSectionComponent.vue +++ b/resources/assets/vue/components/bookings/sections/SupplierPendingOrdersSectionComponent.vue @@ -124,6 +124,7 @@