Support the ongoing development of Laravel.io →
Input Views Forms
Last updated 2 years ago.
0

Because passwords doesn't have a default value. So you should skip your second argument.

{{ Form::password('password', ['placeholder' => 'Paswoord']) }}
Last updated 2 years ago.
0

Just a quick heads up, using just [] to refer to arrays may break in some production enviroments, it has happened to me before..

{{ Form::password('field name goes here', ['attribute' => 'value', 'attribute2' => 'value]) }}

I'd recommend you to stick with the classic array() styling

{{ Form::password('field name goes here', array('attribute' => 'value', 'attribute2' => 'value') }}
Last updated 2 years ago.
0

Thanks for your responses @emilmoe and @maurocas!

Last updated 2 years ago.
0

That might be because your production environment is running an older version of PHP. The feature was added very recently.

maurocasas said:

Just a quick heads up, using just [] to refer to arrays may break in some production enviroments, it has happened to me before..

{{ Form::password('field name goes here', ['attribute' => 'value', 'attribute2' => 'value]) }}

I'd recommend you to stick with the classic array() styling

{{ Form::password('field name goes here', array('attribute' => 'value', 'attribute2' => 'value') }}

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Maveee maveee Joined 26 Oct 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.