dousidan1279 2015-07-23 11:13
浏览 736
已采纳

Laravel 5只能从请求获得GET或POST参数

I can access request params using Request::input() or Request::all().

The problem is that my request includes both GET and POST params, but only GET ones are used to calculate signature.

Is there a way to retrieve only a set of GET or a set of POST params from request in Laravel 5.1?

Or going with $_GET and $_POST is my only option here?

Thank you.

  • 写回答

3条回答 默认 最新

  • doumu5934 2015-07-23 11:23
    关注

    You can use Request::query() to get only GET parameters. Keep in mind that there are no guaranties about consistency in the order of parameters you get from GET, so you might need to sort the array before calculating the signature - depending on how you calculate the signature.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 overleaf中论文编辑,报错`pages' is a missing field, not a string, for entry 4
  • ¥15 vhdl+MODELSIM
  • ¥20 simulink中怎么使用solve函数?
  • ¥30 dspbuilder中使用signalcompiler时报错Error during compilation: Fitter failed,求解决办法
  • ¥15 gwas 分析-数据质控之过滤稀有突变中出现的问题
  • ¥15 没有注册类 (异常来自 HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
  • ¥15 知识蒸馏实战博客问题
  • ¥15 用PLC设计纸袋糊底机送料系统
  • ¥15 simulink仿真中dtc控制永磁同步电机如何控制开关频率
  • ¥15 用C语言输入方程怎么