You are probably getting this because files is an array. ( files[] ) Maybe this will fix the problem.
$files = Input::file('files');
foreach ( $files as $file ) {
$name = $file->getClientOriginalName();
echo $name . '<br>';
}
You can try to debug a bit on your own first. If it's telling you $file
is a non-object, the first question that should come to your mind is: What the heck is $file
then? Laravel has a nice helper function for debugging:
dd($file);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community