To keep it simple, I have this in my view:
{{ Form::open(['route' => 'files', 'method' => 'POST', 'files' => 'true']) }}
{{ Form::file('file') }}
{{ Form::submit(); }}
{{ Form::close() }}
And in my controller:
return Response::json([$_FILES, print_r(Input::file('file'),1)]);
This is the response I get when I submit:
[
{
"file": {
"name": "sample.jpg",
"type": "image/jpeg",
"tmp_name": "/tmp/phpItZT7K",
"error": 0,
"size": 17645
}
},
{}
]
The only real solutions I've come across while searching is the enctype, which I have on my form via the 'files' attribute in Form::open. At this point, I have no idea what's going on. It's not application-breaking, but it's still annoying. If anyone could shed some light on this, I'd be very happy.