1

I am having problem of getting value from input file from my html. The name of the input file is an array. It's work fine if I want to get value of the input file just the normal name.

HTML:

<input type="file" name="collateral_photo[]" id="collateral_photo" class="default" />

PHP:

$file = Request::file('collateral_photo');

return $file;

The value return is empty. What I want is to get value from input file as array. Please tell how to do that. I'm newbie to Laravel 5. Many thanks.

1 Answer 1

1
$file = Input::file('collateral_photo');

Have you done this (multipart/form-data):

<form ..... enctype="multipart/form-data">
Sign up to request clarification or add additional context in comments.

1 Comment

Yes, I do have it in my form.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.