1

I have a problem with Laravel collective select placeholder not working

 {{ Form::select('album',$albums,$selected, ['class'=>'form-control','placeholder'=>'select album' ]) }}

But when i allow tags to true like this using select 2, it works fine,

 {{ Form::select('tags[]',$tags,$tagged, ['data-input'=>'select2-tags','multiple'=>true]) }}

The second one works fine, I don't want the album to have multiple input attribute, What am i doing wrong?

TechPotter
  • 579
  • 8
  • 14

2 Answers2

0

You can do this with select, but you can add placeholder as the value with 0 index:

$albums[0] = 'select album';

Alternatively, you can create your own select function using Laravel Collective Form macros.

Alexey Mezenin
  • 158,981
  • 26
  • 290
  • 279
0

You can follow this :

 {{ Form::select('album', $album , Input::old('album'), array('placeholder' => 'Please select','class'=>'form-control')) }}
tanvirjahan
  • 164
  • 1
  • 1
  • 8