Laravel Vapor - Logs output minor amendments

This commit is contained in:
Dillon Ngo
2024-11-12 08:55:19 +08:00
parent 4a2836d9c7
commit 8363ff0344
2 changed files with 9 additions and 7 deletions
@@ -18,10 +18,12 @@ class LogRequestPathMiddleware
*/
public function handle(Request $request, Closure $next)
{
$method = $request->method();
LogHelper::channel('request_path')->info('Request Method: ' . $method);
$fullUrl = $request->fullUrl();
LogHelper::channel('request_path')->info('Request URL: ' . $fullUrl);
if(env('APP_ENV') !== 'local'){
$method = $request->method();
$fullUrl = $request->fullUrl();
LogHelper::channel('request_path')->info('Request Method: ' . $method);
LogHelper::channel('request_path')->info('Request URL: ' . $fullUrl);
}
if ($request->isMethod('post')) {
$payload = $request->all();