Timothy Kruger Timothy Kruger - 9 months ago 42
PHP Question

select id attribute not getting set using Laravel 5.2 and "laravelcollective/html": "5.2.*"

select's id attribute is not getting set by using

{{ Form::select('language', $options, 'en_ZA', array('id' => 'language')) }}

In my view and "laravelcollective/html": "5.2.*" in composer.json.

I also wanted to know going forward using Laravel 5.2., if it's best to use "laravelcollective/html": "5.2." instead of "illuminate/html" in my composer.json file?

Answer Source

For anyone interested I managed to figure it out, you need to do this

{{ Form::select('language', $options, 'en_ZA', ['id' => 'language']) }}

Instead of

{{ Form::select('language', $options, 'en_ZA', ('id' => 'language')) }}

I'll create a new question regarding my second question above and mark this question as answered.