I have a Laravel form that looks like this...
{!! Form::open(['action' => 'SitesController@store', 'method' => 'POST', 'id' => 'sites_create_form', 'enctype' => 'multipart/formdata']) !!}
{{Form::label('s_name', 'Site Name')}}
{{Form::text('s_name', '', ['class' => 'form-control', 'placeholder' => 'Site Name'])}}
{!! Form::close() !!}
I also have a Javascript object containing an array of image ids, I would like to pass this to the controller so I can process the ids and add them to the resulting site.
I am thinking that the best option is to echo the array to a hidden form field and do it that way?
Is there a better way to do it, can I pass the javascript object directly to the controller?