Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Zurik.Ludg's avatar

Question: Displaying result from a database into a 'placeholder' class residing in a form?

How can I go about displaying result from a database into a placeholder class residing in a form? Can't seem to find the correct term when searching for an answer, 'escaping curly brace'?

{{ Form::text('name', null, array('class' => 'form-control', 'placeholder' => 'DISPLAY RESULT HERE' )) }}
0 likes
3 replies
SaeedPrez's avatar
<input type="text" name="name" class="form-control" placeholder="{{ $placeholder }}" value="{{ old('name') }}">
<input 
    type="text" 
    name="name" 
    class="form-control" 
    placeholder="{{ $placeholder }}" 
    value="{{ old('name') }}"
>
1 like
SaeedPrez's avatar

@Zurik.Ludg I really don't see the benefit of that package, HTML is a lot more readable and not that much longer (in characters).

Please or to participate in this conversation.