[英]Laravel upload multifile get NULL inside controller
我正在尝试使用laravel4上传多文件。
视图:
{{ Form::open($address,array('route' => array('address.update', $address->id, 'files'=>true))) }}
{{ Form::file('images[]', ['multiple' => true]) }}
{{ Form::close() }}
控制器:
选择一些文件并尝试将文件发送到控制器后,我在控制器内部得到NULL。 例如:
public function postUpdate()
{
$files = Input::file('images');
dd($files);
}
$files
在此阶段为NULL
,为什么?
我认为问题出在Form::open()
标记中。 尝试类似的东西。
{{Form::open(array('route' => array('address.update', $address->id),'files'=>true))}}
{{Form::file('images[]',array('multiple'=>'true')) }}
{{ Form::close() }}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.