This is my upload.blade.php code
{!!Form::open(array('url'=>'parser','method'=>'POST','enctype'=>'multipart/form-data','onsubmit'=>'return validate(this)', 'files'=>true)) !!}
<div class="panel panel-default file-upload">
<div class="panel-heading">
<label for="exampleInputFile">Upload Manually :</label>
</div>
<div class="panel-body">
{!! Form::file('Filename') !!}
<progress id="progressBar" value="0" max="100" width="100%">
</progress>
<h3 id="status"></h3>
<p id="loaded_n_total"></p>
{!! Form::submit('Submit', array('class'=>'btn btn-info','value'=>'Upload File')) !!}
{!! Form::close() !!}
Then i am having a controller class to move uploaded file, the upload function is
public function uploadFile(){
$a=session('upload');
$path="/logparser/html/upload/".$a;
$fileExistsFlag = 0;
$file = array('Filename' => Request::file('Filename'));
if(!(is_dir($path))){
mkdir($path, 0777);
chmod($path,0777);
}
Request::file('Filename')->move($path);
Session::flash('success', 'Upload successfully');
return view('dash');
}
It is giving an error: Call to a member function move() on null And i looked at the contents of file but the array was empty.