I want to know what the error, because i think my path are correct but still giving me error as path here is the code
public function importfile(Request $request){
$validator = Validator::make($request->all(), [
'file' => 'required||max:5000|mimes:xls, xls, csv'
]);
if($validator->passes()){
$dateTime = date('Ymd_His');
$file = $request->file('file');
$fileName = $dateTime . '-' . $file->getClientOriginalName();
$savePath = public_Path('/excelFile/');
$file->move($savePath, $fileName);
$getFileWithPath = public_Path("/excelFile/".$fileName);
$array = Excel::toCollection(new BreakByMin, $getFileWithPath);
return redirect()->back()
->with(['success'=>'File uploaded successfully.']);
}else{
return redirect()->back()
->with(['errors' => $validator->errors()->all()]);
}
}
when i tried to check where my file are the file are exactly in there but i always got an error mk such dir
i don't understand this error, because i check it clearly and the data is there