I am attempting to check to see whether the user of my application has uploaded a file upon registration. I have set the form enctype to multipart in my form:
<form class="col-md-3" action="create" method="POST" enctype="multipart/form-data">
In the CreateController I am doing the following, just to test the $request->hasFiles() method. I have placed this at the head of the method.
if($this->request->hasFiles()) {
print 'File uploaded';
exit;
}
It's never true, even if a file is uploaded. I have also tried to var_dump($_FILES) and there seems to be nothing there too.
Any ideas what could be going wrong here?