use Symfony\Component\HttpFoundation\Request; $request = Request::createFromGlobals(); if ($request->getMethod() == 'POST') { $username = $request->get('username'); $password = $request->get('password'); // Perform login action using username and password }In this example, we are creating a new Request instance using the createFromGlobals method, which uses the current request data to populate the object. We then check if the request method is POST and retrieve the username and password values from the request using the get method. The Request class is part of the Symfony HTTP Foundation component, which provides a set of classes for working with HTTP requests and responses in PHP.