【问题标题】:Get value from query string从查询字符串中获取值
【发布时间】:2019-04-21 06:20:07
【问题描述】:
http://localhost:3000/hospital/public/service/create?5 

我想在创建页面的输入值中得到这个 5。

 <input type="number" name="patient_id" class="form-control" placeholder="ID" value=""> 

【问题讨论】:

  • 也许您可以使用$key = Input::get('key');,然后在值内使用它。见5balloons.info/…

标签: laravel-blade laravel-5.8


【解决方案1】:

5悬空,我觉得url应该是:

http://localhost:3000/hospital/public/service/create?patient_id=5 

然后

<input type="number" name="patient_id" class="form-control" placeholder="ID" value="<?= Input::get('patient_id'); ?>"> 

或任何 php-bplade 语法。 &lt;?= ?&gt; 可能不起作用

【讨论】:

  • 不会这样,因为 Patient_id 在服务表中是为了获取患者 ID
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-04-24
  • 1970-01-01
  • 2020-11-09
  • 2015-11-02
相关资源
最近更新 更多