1

i'm trying to upload multi file with laravel4.

View:

{{ Form::open($address,array('route' => array('address.update', $address->id, 'files'=>true))) }}

{{ Form::file('images[]', ['multiple' => true]) }}

{{ Form::close() }}

Controller:

after choose some file and try to send files into controller i get NULL inside controller. for example:

 public function postUpdate()
    {
        $files = Input::file('images');
        dd($files);
    }

$files in this phase is NULL, why?

2
  • try printing all data Input::All() do you get anything? Commented May 22, 2015 at 13:25
  • @kamlesh.bar yes, that have images item into array, but Input::file('images'); is null Commented May 22, 2015 at 13:38

1 Answer 1

1

I think the problem is in the Form::open() tag. Try something like.

{{Form::open(array('route' => array('address.update', $address->id),'files'=>true))}}
{{Form::file('images[]',array('multiple'=>'true')) }}
{{ Form::close() }}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.