i have script like this in my view
<form method="post" enctype="multipart/form-data" action="{{ URL::route('import.produk.post') }}">
<input type="file" name="import">
<button class="btn btn-primary form-button" type="submit">Save</button>
</form>
in my controller i wanna show path of file
lets say that file located in D:\Data\product.xlsx
i using this script to do that
public function postImportProduk() {
$input = Input::file('import')->getRealPath();;
var_dump($input);
}
but it's not display real path of the input file instead temp file like this output
string(24) "C:\xampp\tmp\phpD745.tmp"
i try with ->getFilename()
it's show temp filename too phpD745.tmp
but if i'm using ->getClientOriginalName()
it's show exactly product.xlsx
i wonder how to get file real path
ps : i'm using laravel 4.2