I am working in a project Laravel 5.4. When I upload a file(doc,docx,pdf) it uploaded successfully. But If I implement validation in controller like
$this->validate(request(), [
'user_name' => 'required',
'attachment' => 'required|mimes:pdf,doc,docx',
]);
it redirect to the input form with The attachment must be a file of type: pdf, doc, docx.
I tried with doc and pdf file it returns same. Where is my problem thank you.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire