I have a form looking like this:
{{ Form::open(array('route' => 'notebook.store', 'files' => true)) }}
{{ Form::text('title', null, [
'class'=>'form-control',
'placeholder'=>'Title',
]) }}
<br>
{{ Form::text('description', null, [
'class'=>'form-control',
'placeholder' => 'Desc',
])}}
<br>
{{ Form::file('path') }}
<br>
{{ Form::submit('Save', [
'class' => 'btn btn-primary btn-lg pull-right'
]) }}
<br><br>
{{ Form::close()}}
The problem is that Input::all() in my controller returns an empty array if that 'files'=>true is in the form description, when I remove it, the problem goes away and Input::all() returns the usual, expected input.
Edit- I found out what the problem was. My server had terribly low post_max_size in php.ini, and apparently it clears all your post/get data if the file exceeds that limit.
'files' => trueto one of my forms, and there was no problem withInput::all(). This option just addsenctype="multipart/form-data"to the<form>element.