public static function getParams(Request $request, $method = null)
    {
        if($method === null)
        {
            $method = $request->getMethod();
        }
        if(strtoupper($method) === Utils::$METHOD_GET)
        {
            return $request->query->all();
        } else if(strtoupper($method) === Utils::$METHOD_POST)
        {
            return $request->request->all();
        } else
        {
            return null;
        }
    }