Merge branch 'dillon/34.7-jenkins-vapor' into vapor/development

This commit is contained in:
Dillon Ngo
2024-10-12 00:10:43 +08:00
@@ -2,6 +2,7 @@
namespace App\Http\Middleware;
use App\Classes\General\LogHelper;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
@@ -18,13 +19,13 @@ class LogRequestPathMiddleware
public function handle(Request $request, Closure $next)
{
$method = $request->method();
Log::channel('request_path')->info('Request Method: ' . $method);
LogHelper::channel('request_path')->info('Request Method: ' . $method);
$fullUrl = $request->fullUrl();
Log::channel('request_path')->info('Request URL: ' . $fullUrl);
LogHelper::channel('request_path')->info('Request URL: ' . $fullUrl);
if ($request->isMethod('post')) {
$payload = $request->all();
Log::channel('request_path')->info('Request Payload POST: ', $payload);
LogHelper::channel('request_path')->info('Request Payload POST: ', $payload);
}
return $next($request);