简体   繁体   English

Laravel 4和Blade,如何在表单标签中输出Blade变量

[英]Laravel 4 and Blade, How to output blade variable in form label

There is probably a really easy answer to this question. 这个问题可能很简单。 I need to make a Label based on a fixed string such as 'quesID' followed with a number stored in a variable. 我需要基于固定字符串(例如“ quesID”)加上一个存储在变量中的数字来制作标签。

So far I have this 到目前为止,我有这个

 {{ Form::label($question->que_question_id, 'quesID') }}

Outputs 产出

 <label for="2">quesID</label>

I have tried 我努力了

  {{ Form::text($question->que_question_id, 'quesID' $question->que_question_id) }}

But I get syntax errors. 但是我收到语法错误。 Is there a way to output the varible? 有没有办法输出该变量?

尝试

{{ Form::text($question->que_question_id, 'quesID '.$question->que_question_id) }}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM