Denason's avatar

Upload image problem

hi.

i have a problem with upload image

i use laravel Form :

{{ Form::open(array('file'=>true,'action' => 'userController@store','method'=>'post')) }}

{{ Form::file('profile') }}

{{ Form::close() }}

when i check userController like var_dump( $request->hasFile('profile'));

it return FALSE

$request ->hasFile get back FALSE and don't upload anything

0 likes
2 replies
MiguelBarros's avatar
Level 44

the form must have this attribute enctype set to "multipart/form-data"

Denason's avatar

YES- i write file => true that is not correct - must write files => true so multipart/form-data add to form attribute

Please or to participate in this conversation.