Guntar Guntar - 1 year ago 97
PHP Question

Laravel Collective HTML5 attributes

How do I pass in an HTML5 attributes like: required, auto focus...?

I can enter other attributes which have name="value", but not an attribute that consist of only one word.

Answer Source

Pass the array with values as third (for select as fourth) parameter:

{!! Form:: text('name', null, ['required' => true, 'some-param' => 'itsValue', 'class' => 'some-class' ]) !!}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download