php - Input::file() returns nothing -
i trying upload image using laravel frame work facing difficulty problem $file=input::file();
returns nothing , after when write $filename = $file->getclientoriginalname();
error call member function getclientoriginalname() on non-object
please me here html code
<form action="enter-input" method="get" enctype="multipart/form-data"> <input name='image' style="width:194px;"type='file' class='form-control'> <input type="submit" class="btn btn-primary" value="submit"> </form>
here controller code
$file= input::file('image'); $filename = $file->getclientoriginalname();
the first line returns nothing , second line shows error call member function getclientoriginalname() on non-object
me guys stuck in problem , new laravel.
change method="get"
method="post"
.
Comments
Post a Comment