I have an input field who allaow peoples to upload files. I want that they can upload, word files like doc, and files like csv,xlsx.
When i try with a .doc no proble
I tried validators provided by laravel but all doesnt seems to work.. That gave me an idea to try to validate using normal php and it works like a cham
$extensions = array("xls","xlsx","xlm","xla","xlc","xlt","xlw");
$result = array($request->file('import_file')->getClientOriginalExtension());
if(in_array($result[0],$extensions)){
// Do something when Succeeded
}else{
// Do something when it fails
}